If you are unable to create a new account, please email support@bspsoftware.com

 

Error: "On full left cross inner right using exception"

Started by gatorfe, 05 Oct 2014 06:36:30 PM

Previous topic - Next topic

gatorfe

Hello, I am trying to validate this syntax below in DM against a db2 on an as/400.  I get the message that shows up in the subject line above.  Not sure how to get around this.  Any suggestions would greatly be appreciated.

SELECT
A."CCUST"  AS "CUSTOMER_NO",
A."CNME"   AS "CUSTOMER_NM",
B."CTDESC" AS "CUSTOMER_GROUP_NM",
C."SNAME"  AS "CUSTOMER_CAT15_DESC",
D."TMDESC" AS "TERMS DESCRIPTION",
E.CCCODE AS ZCC_CODE

FROM 
ERPLXF."RCM" A
JOIN ERPLXF."RCT" B on B."CTCOMP"=A."CCOMP" AND B."CTCSTP"=A."CTYPE" AND B."CTCURR" = A."CCURR"
JOIN ERPLXF."SSM" C on C."SSAL" = A."CSAL"
JOIN ERPLXF."RTM" D  and D."TMTERM"=A."CTERM" and D."TMCMPN" = A."CCOMP"
LEFT OUTER JOIN ERPLXF."ZCC" E ON E."CCCODE"=A."CREF01"

WHERE
A."CCUST" <> 0 and E."CCID" = 'CC' and E."CCTABL" = 'SCRF1'

MFGF

Quote from: gatorfe on 05 Oct 2014 06:36:30 PM
Hello, I am trying to validate this syntax below in DM against a db2 on an as/400.  I get the message that shows up in the subject line above.  Not sure how to get around this.  Any suggestions would greatly be appreciated.

SELECT
A."CCUST"  AS "CUSTOMER_NO",
A."CNME"   AS "CUSTOMER_NM",
B."CTDESC" AS "CUSTOMER_GROUP_NM",
C."SNAME"  AS "CUSTOMER_CAT15_DESC",
D."TMDESC" AS "TERMS DESCRIPTION",
E.CCCODE AS ZCC_CODE

FROM 
ERPLXF."RCM" A
JOIN ERPLXF."RCT" B on B."CTCOMP"=A."CCOMP" AND B."CTCSTP"=A."CTYPE" AND B."CTCURR" = A."CCURR"
JOIN ERPLXF."SSM" C on C."SSAL" = A."CSAL"
JOIN ERPLXF."RTM" D  and D."TMTERM"=A."CTERM" and D."TMCMPN" = A."CCOMP"
LEFT OUTER JOIN ERPLXF."ZCC" E ON E."CCCODE"=A."CREF01"

WHERE
A."CCUST" <> 0 and E."CCID" = 'CC' and E."CCTABL" = 'SCRF1'

Should the red highlighted parts be in quotes?

I suspect the real issue is the orange part - shouldn't it be ON rather than AND?

MF.
Meep!