[9255] in SAPr3-news
Re: Join - Syntax
daemon@ATHENA.MIT.EDU (Mo)
Tue Dec 15 17:57:23 1998
To: sapr3-news@MIT.EDU
Date: Tue, 15 Dec 1998 16:53:43 -0500
From: "Mo" <tmossernospam@valkyrie.net>
Inner Join Syntax:
SELECT <fieldlist> INTO <target>
FROM <dbtab1> AS <alias1>
INNER JOIN <dbtab2> AS <alias2>
ON <alias1>~<field1> = <alias2>~<field1>
AND <alias1>~<field2> = <alias2>~<field2>
AND ...
WHERE ...
ENDSELECT.
Left Outer Join Syntax:
SELECT <fieldlist> INTO <target>
FROM <dbtab1> AS <alias1>
LEFT OUTER JOIN <dbtab2> AS <alias2>
ON <alias1>~<field1> = <alias2>~<field1>
AND <alias1>~<field2> = <alias2>~<field2>
AND ...
WHERE ...
ENDSELECT.
I haven't tested using move than two tables(don't know if it is possible),
but this is the syntax for two tables. Keep in mind that these are for
release 4.0 on.
Troy Mosser
K. Ganapathy wrote in message <367697FE.48608BCF@synopsys.com>...
>Could someone post the syntax for
>'inner join' and 'outer join' in the 'where' clause.
>Specifically, those involving more than 2 tables.
>
>Thanks.
>
>K. Ganapathy.