Re: Outer Join Compatability in SQL Server 2000
From: Aaron Bertrand - MVP (aaron_at_TRASHaspfaq.com)
Date: 05/19/04
- Next message: Adam Machanic: "Re: Outer Join Compatability in SQL Server 2000"
- Previous message: joe: "Re: Windows Integrated security"
- In reply to: Grant Reid: "Outer Join Compatability in SQL Server 2000"
- Next in thread: Adam Machanic: "Re: Outer Join Compatability in SQL Server 2000"
- Reply: Adam Machanic: "Re: Outer Join Compatability in SQL Server 2000"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 May 2004 13:01:30 -0400
(I tried a simpler repro, and couldn't reproduce your error, by the way.
Can you provide table structure and sample data?)
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/ "Grant Reid" <grant.reid@telefonica(dot)net> wrote in message news:uHoXPCcPEHA.3100@TK2MSFTNGP10.phx.gbl... > Hello, > > I have read that MS-SQL Server 2000 still supports the old syntax of doing > outer joins. > > From everything I understand about the new join, these 2 statements below > should be synonymous. Rather strangely, only the new statement SQL-92 > syntax actually works. > > While I have read that it is recommended to use the new style, I have > already written a small parser for handling the old style and creating some > Dynamic SQL. I'm not really that enthused about re-writing the parser to > handle the new syntax at the moment. So, am I simply misunderstanding the > joins, or is the functionality actually already starting to be removed. > > The old statement yields me the following error: > Server: Msg 301, Level 16, State 1, Line 1 > Query contains an outer-join request that is not permitted. > > SELECT stu.student_id > FROM student stu, > student_product sp, > location_product lp, > school_location sl > WHERE stu.student_id *= sp.student_id > and sp.product_id *= lp.product_id > and lp.school_loc_id *= sl.school_loc_id > > The following statement gives me the correct result - although I don't want > to use it for this particular query. > SELECT stu.student_id > FROM student stu LEFT JOIN student_product sp ON (stu.student_id = > sp.student_id) > LEFT JOIN location_product lp ON > (sp.product_id = lp.product_id) > LEFT JOIN school_location sl ON > (lp.school_loc_id = sl.school_loc_id) > > Any assistance appreciated! > > Thanks > Grant > >
- Next message: Adam Machanic: "Re: Outer Join Compatability in SQL Server 2000"
- Previous message: joe: "Re: Windows Integrated security"
- In reply to: Grant Reid: "Outer Join Compatability in SQL Server 2000"
- Next in thread: Adam Machanic: "Re: Outer Join Compatability in SQL Server 2000"
- Reply: Adam Machanic: "Re: Outer Join Compatability in SQL Server 2000"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|