× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This question is probably more appropriate for midrange-l, but here's an
example joining 5 tables.  Notice that you can use parentheses to control
the join.

Regards,
Stan

SELECT DISTINCT e070_q21.as4user,  e070_d11.as4user, e070_r82.as4date as
R82_Date, e070_q21.trkorr, e070_d11.trkorr, e07t_d11.as4text,
e070_q21.trfunction, e070_q21.trstatus, e070_q21.tarsystem,
e070_q21.korrdev, e070_q21.as4date, e070_q21.as4time, e070_q21.strkorr
   FROM ((r3q21data.e070 e070_q21
      LEFT OUTER JOIN r3d11data.e07t e07t_d11
         ON e070_q21.trkorr = e07t_d11.trkorr)
      EXCEPTION JOIN mcpartland.e070 e070_p31
         ON e070_q21.trkorr = e070_p31.trkorr)
      LEFT OUTER JOIN r3d11data.e070 e070_d11
         ON e070_q21.trkorr = e070_d11.strkorr
      LEFT OUTER JOIN r3r82data.e070 e070_r82
         ON e070_q21.trkorr = e070_r82.trkorr
   WHERE e070_q21.trkorr like 'D11K9%'
      AND e070_q21.as4date >= '20010521'
   ORDER BY e070_d11.as4user, e070_q21.trkorr

-----Original Message-----
From: Giri Gopal [mailto:GiriGopal@bcginK.com]
Sent: Thursday, 30 August, 2001 2:42 PM
To: rpg400-l@midrange.com
Subject: Help in SQL



 Hello:

I want to join 3 physical files. Can some one help in the syntax of creating
an SQL statement to join 3 physical files.


Thanks
GG

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.