Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2935

datawindow graphical syntax outer join BUG

$
0
0

Ok, so this is a bug report.  I don't know where i'm supposed to post it for SAP (i do have support).

 

The outer join syntax is ansi.

 

Using the graphical SQL designer, outer joins are incorrectly written by powerbuilder.  This has been going on ever since ANSI style outer join sytax was added (PB 9?).

 

I think it has to do with the datawindow's use of both right and outer joins and its lack of use of inner joins.  The end result is that we have to rewrite a lot of stuff in sql since powerbuilder is generating bad sql.

 

The typical example is the use of 2 or more outer joins where the joins are being done using 2 or more columns.

PB will create both a LEFT and a RIGHT outer join by duplicating the table name.  The table (receive) is only selected ONCE in the sql graphical designer.

 

And this is the result:

 

Microsoft SQL Native Client

The objects "receive" and "receive" in the FROM clause have the same exposed names. Use correlation names to distinguish them.
Do you want to correct errors?

 

 

I would love to see the datawindow sql corrected and written in a more standard way.

1 change the OUTER JOIN syntax in the db profile setup to indicate the syntax.  not outer join, but syntax.  If you select ANSI have it write ALL joins using JOIN ( from ta join tb on ta.col = tb.col) intead of from tablea, tableb where tablea.col = tableb.col

 

2 - eliminate the use of right outer joins.

 

At that point i believe that the datawindow could more easily be fixed by SAP to not duplicate tables when in generates the syntax.


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>