Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Outer join question


Message #1 by "Pete Davis" <pdavis@q...> on Tue, 19 Jun 2001 11:10:13 -0400
Well, then I guess that's the way I'm going to have to go. Unfortunately,
these SQL statements are created by a piece of code that's pretty darn
complex, and making the change to *= was really simple. Moving the join from
the WHERE clause to the FROM clause is much more complicated. ARGH... Can
never seem to win.

Pete
----- Original Message -----
From: "Breidenbach, Beth" <Beth.Breidenbach@g...>
To: "sql language" <sql_language@p...>
Sent: Tuesday, June 19, 2001 11:48 AM
Subject: [sql_language] RE: Outer join question


Pete,

My apologies.  I misread your email.

The '*=' is the older, deprecated method of doing joins as defined (I
believe) in the SQL-89 spec.

The 'LEFT OUTER JOIN' syntax is defined in the SQL-92 ANSI spec.  This
is the preferred method, and has the happy side effect of providing
accurate results in a few scenarios where the old syntax fails.  (See
Celko's "SQL for Smarties" and Ken Henderson's "Guru's Guide to
Transact-SQL" for details of the failure points.)

I had a hard time training myself to use the newer syntax, as it seemed
overly verbose and I _liked_ my *= syntax.  :-)  But, the switch has
been well worth the effort.

I recommend sticking with the SQL-92 ANSI spec.

Beth

-----Original Message-----
From: Pete Davis [mailto:pdavis@q...]
Sent: Tuesday, June 19, 2001 8:30 AM
To: sql language
Subject: [sql_language] RE: Outer join question


SQL Query Analyzer returns the error:

"Query contains an outter join request that is not permitted"

I thought the '*=' sample in my statement below WAS the ANSI syntax. Do
I
have that wrong?

Pete


  Return to Index