[9274] in SAPr3-news
Re: Join - Syntax
daemon@ATHENA.MIT.EDU (David Knittle)
Wed Dec 16 11:17:33 1998
To: sapr3-news@MIT.EDU
Date: Wed, 16 Dec 1998 15:10:14 GMT
From: "David Knittle" <knittle@benteler.com>
haven't tried the alias keywords but the rest also works at 3.1h. we have
been using it for some time now. as far as we have been able to find out, 2
tables is the limit.
Mo wrote in message <36769495.0@news.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.
>
>