Better still RBase supports nested INNER and OUTER JOINS. Try following syntax;

  FROM (((((RegisterOfMbrs R INNER +
  JOIN MbrCurHomeAdr H ON R.MbrNumber=H.MbrNumber) J1 INNER +
  JOIN MbrCurWorkAdr W ON J1.MbrNumber=W.MbrNumber) J2 INNER +
  JOIN AcademicAsList A ON J2.MbrNumber=A.MbrNumber) J3 INNER +
  JOIN DirHighSchools S ON J3.HighSchoolNbr=S.HighSchoolNbr

You can also nest a mixture of INNER JOINS, LEFT OUTER JOIN, RIGHT OUTER JOIN, 
and FULL OUTER JOIN. The key is proper use of Parentheses.  This syntax 
available in v7.6 (Windows & DOS) and higher. 


Jim Bentley
American Celiac Society
[email protected]
tel: 1-504-737-3293


>
>From: Lawrence Lustig <[email protected]>
>To: RBASE-L Mailing List <[email protected]>
>Sent: Tue, November 16, 2010 1:21:50 PM
>Subject: [RBASE-L] - Re: Inner Join: Joining 3 or more tables?
>
>
>You can perform multiple INNER JOINs in a single statement using the older 
>SQL-89 syntax:
>
>
>SELECT * FROM table1, table2, table3 +
>  WHERE table1.colX = table2.colY AND table2.colA = table3.colB
>
>
>Unfortunately, this works only for implicit INNER JOINs in the older syntax. 
> For SQL-92 syntax (which is the only way to do OUTER JOINs) you are limited 
> to 
>2 tables per SELECT statement.  The work-around there is to use nested views 
>as 
>described in your message.
>--
>Larry


      

Reply via email to