Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 OUTER( ppi, party, OUTER person, OUTER org )

Author  Topic 

doco
Yak Posting Veteran

77 Posts

Posted - 2008-10-03 : 16:59:02
I am attempting to translate an Informix script to SQL Server and came up against


OUTER( ppi, party, OUTER person, OUTER org )


I went here [url]http://savage.net.au/SQL/outer-joins.html[/url] to example 5, but its not much help. Any light that may be shed on this would be appreciated.

TIA

Education is what you have after you've forgotten everything you learned in school

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-10-03 : 17:02:26
Perhaps that's their silly way of writing multiple outer joins.

LEFT OUTER JOIN Table1 ON ...
LEFT OUTER JOIN Table2 ON ...
LEFT OUTER JOIN Table3 ON ...

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-04 : 07:04:12
seems like

leftquery OUTER( ppi, party, OUTER person, OUTER org )
is equivalent to

(leftquery) l
LEFT OUTER JOIN (SELECT fields
FROM ppi
INNER JOIN party ON fields..
LEFT OUTER JOIN person ON fields..
LEFT OUTER JOIN org ON fields...) t
ON t.fields..=l.fields...
Go to Top of Page

doco
Yak Posting Veteran

77 Posts

Posted - 2008-10-04 : 13:27:35
Thanks visakh - it works swimmingly


...
LEFT OUTER JOIN AscendWheelerMain..ppi ppi
INNER JOIN AscendWheelerMain..party pty
ON ppi.party_id = pty.id
LEFT OUTER JOIN AscendWheelerMain..person pers
ON pers.party_id = ppi.party_id
LEFT OUTER JOIN AscendWheelerMain..org orgn
ON orgn.party_id = ppi.party_id
ON ppi.id = ex.ppi_id
...


Education is what you have after you've forgotten everything you learned in school
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-04 : 13:45:57
welcome
Go to Top of Page
   

- Advertisement -