views:

90

answers:

3

I have some older (broken) code that has a join using a *=

table1.ID *= table2.ID

Is this a left outer join or a right outer join? (My error message indicates it is one of those)

A: 

*= indicates left-outer join and =* indicates right-outer join.

EDIT:

I had my joins mixed up, have been corrected.

Anthony Forloney
astander wins - http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/13070;pt=12475
mbeckish
yeah I had typed too fast to answer, and didn't realize what I had wrote for what syntax, gg me.
Anthony Forloney
Good -- because I had two opposite answers, both from people with a lot of rep and badges, so I've been waiting for the right one to bubble to the top.
thursdaysgeek
Vote him up ... he's corrected his sin :p
Nissan Fan
Haha yeah, good thinking. I jotted down the answer and went to a different tab on my browser and when I had returned I noticed a downvote and then I knew what I had done.
Anthony Forloney
Google search doesn't work so well on a couple of characters, or perhaps I have poor google-fu.
thursdaysgeek
@Nissan Fan: Thanks, I appreciate it. I couldn't react fast enough to save the answer.
Anthony Forloney
@thursdaygeek, for future reference, google does not work well with symbols, i.e (`*` and `=`) but spelling them out could help, i.e. (`asterisk` and `equals`)
Anthony Forloney
@Anthony Forloney - Thank you! That gave me the right answer right away. I'll remember that next time. (This still gives a better answer, with some reasonable examples as well.)
thursdaysgeek
@thursdaysgeek, not a problem anytime, glad I could help.
Anthony Forloney
+3  A: 
*= (LEFT OUTER JOIN)

=* (RIGHT OUTER JOIN)

But rather make use of the LEFT/RIGHT JOINS

astander
A: 

please replace that with modern LEFT OUTER JOIN .. ON syntax!!

left outer join *=
right outer join =*

KM