>Hi All,
>
>Is there a standard way of expressing outer joins for any server?
>
>I have following query working in VFP but not under Oracle :
>
>SELECT field1, field2, mytable2.field3 FROM mytable1 LEFT OUTER JOIN mytable2 ON mytable1.field1 = mytable2.field1
>
>Following works under Oracle but not under VFP:
>
>SELECT field1, field2, mytable2.field3 FROM mytable1, mytable2 WHERE mytable1.field1 (+)= mytable2.field1
>
>What I want is a syntax by which both will recognize and execute.
>
>Thanks for any help.
>
>Regards
>Vijay
Vijay,
I believe the following will work in both:
SELECT field1, field2, mytable2.field3 FROM mytable1,mytable2 ;
where mytable1.field1 = mytable2.field1
UNION
SELECT field1, field2, ' ' as field3 FROM mytable1 ;
where mytable1.field1 not in (select mytable2.field1 from mytable2)
You have to go back to the days before we had outer joins in VFP.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao