Re: OUTER JOIN !!!!
Posted in 1996
Topics: SQL Development & Query Writing
Barbara Paltiel (barbara@paltielinc.com) wrote: : Remzi: Use the UNION clause in the SQL statement. THe first half of the : SELECT statement gets all the records where there IS a record in the : child/related table. Then do a UNION with a SELECT that picks records : with NO child records: : : SELECT A.COMPANY, A.INVOICENUM, B.INVOICEITEM from COMPANY, INVITEM; : where COMPANY.INVOICENUM = INVITEM.INVOICENUM; : UNION SELECT COMPANY, INVOICENUM, SPACE(60) from COMPANY WHERE; : INVOICENUN NOT IN (SELECT invoicenum from INVITEM); : into cursor TEMP : : Check the Help files & manual for other examples about UNION. : : Barbara Paltiel : : ************************************ : : Remzi Oten wrote: : > : > Hi, : > If your SQL server does not do outer joins but you need to combine : > tables using the outer join method what should you do to substitute ? : > I'll appreciate any kind of comments. Thank you ?-- : > _________________________ : > REMZI OTEN : > UNIV. OF CALIFORNIA, IRVINE : > ECE DEPT. : > Tel:(714)824-2917 (lab) : > (714)509-0878 (home) : > _________________________ :