|
since it is a total inner join, you don't need the parentheses. on line 61, the join token appears where a correlation name might be expected. This could be one of those subtle discrepancies in the pre-compiler, but again, the parentheses are unneccessary and, if not ignored by the pre-compiler, would only serve to reduce the optimizers options. =========================================================== R. Bruce Hoffman, Jr. -- IBM Certified Specialist - AS/400 Administrator -- IBM Certified Specialist - RPG IV Developer "America is the land that fought for freedom and then began passing laws to get rid of it." - Alfred E. Neuman -----Original Message----- From: Cyndi Bradberry <CyndiB@IHFA.ORG> To: 'Midrange-L@midrange. com' (E-mail) <Midrange-L@midrange.com> Date: Wednesday, June 20, 2001 1:08 PM Subject: SQL Question Part 2 >We worked out the problem with the ISO dates, and have moved on to another >program. I am trying to Join together 3 files with a common field (LOAN >NUMBER). This Select statement works in ISQL, but I get this error when I >try to put it into a program: > > MSG ID SEV RECORD TEXT > > SQL0199 30 61 Position 34 Keyword JOIN not expected. Valid tokens: ) >,. > > 57 C/Exec SQL > > 58 C+ Declare MasterTable Cursor > > 59 C+ For Select M1LOAN, SMA450, SMA240 > > 60 C+ A1FNAM, A1LNAM, A1HARA, A1HPFX, A1HNBR, > > 61 C+ From ( LDATAQ1C/SRVMLD JOIN LDATAQ1C/SRVALT1 On > > 62 C+ M1LOAN = A1LOAN ) Join LDATAQ1C/SRVDSRLZZ On > > 63 C+ A1LOAN = CATL# > > 64 C+ Where SMA240 > 0 and > > 65 C+ (SMA450 >= 17 and SMA450 <= 31) and > > 66 C+ A1SEQ = 01 > > 67 C+ Order By A1LNAM > > 68 C+ For Fetch Only > >Can anyone help me to see where I have gone wrong ? I really can't see the >forest for the trees. We are at V4R4, current on CUM and Group PTF's (Just >applied a bunch of SQL PTF's this morning ;-). > >Cyndi B. >Boise, ID > >PS: Is there anyone else from Boise/Nampa/Caldwell on the list ? Direct >mail please ! >+--- >| This is the Midrange System Mailing List! >| To submit a new message, send your mail to MIDRANGE-L@midrange.com. >| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. >| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. >| Questions should be directed to the list owner/operator: david@midrange.com >+--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.