January 30, 2014 at 11:24 am
We have a couple of databases running in 2000 compatibility code due to old style left & right joins such as
[font="Courier New"]Select * from TableA, TableB
Where TableA.MemID *= TableB.MemID[/font]
I understand that 2012 does not have compatibility 2000, so we have to fix those types of joins before upgrading.
Are old style inner joins confined to 2000 also ?
[font="Courier New"]Where TableA.MemID = TableB.MemID[/font]
January 30, 2014 at 11:46 am
Not yet, but I wouldn't continue to use them in current or future development.
January 30, 2014 at 11:50 am
We haven't written any code like that in a while. It is easy to search for '*=' and find the left joins. Not so easy to find the inner joins with just '='
January 30, 2014 at 1:05 pm
homebrew01 (1/30/2014)
We haven't written any code like that in a while. It is easy to search for '*=' and find the left joins. Not so easy to find the inner joins with just '='
Old-style inner joins are likely to stick around for a while yet. We're using 2012 and I'm sure some of the system queries are written like this.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 30, 2014 at 4:15 pm
ChrisM@home (1/30/2014)
homebrew01 (1/30/2014)
We haven't written any code like that in a while. It is easy to search for '*=' and find the left joins. Not so easy to find the inner joins with just '='Old-style inner joins are likely to stick around for a while yet. We're using 2012 and I'm sure some of the system queries are written like this.
I agree. Correlated subqueries would be a whole lot tougher to write. I've never tried it but I'm not sure an ANSI JOIN would actually work in a correlated subquery.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 30, 2014 at 5:45 pm
Jeff Moden (1/30/2014)
ChrisM@home (1/30/2014)
homebrew01 (1/30/2014)
We haven't written any code like that in a while. It is easy to search for '*=' and find the left joins. Not so easy to find the inner joins with just '='Old-style inner joins are likely to stick around for a while yet. We're using 2012 and I'm sure some of the system queries are written like this.
I agree. Correlated subqueries would be a whole lot tougher to write. I've never tried it but I'm not sure an ANSI JOIN would actually work in a correlated subquery.
Careful Jeff - don't hurt yourself using big-boy terms like "correlated subquery"!! :hehe:
See you next weekend in Cleveland buddy!!
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
February 1, 2014 at 5:23 am
ChrisM@home (1/30/2014)
homebrew01 (1/30/2014)
We haven't written any code like that in a while. It is easy to search for '*=' and find the left joins. Not so easy to find the inner joins with just '='Old-style inner joins are likely to stick around for a while yet. We're using 2012 and I'm sure some of the system queries are written like this.
Could you or someone confirm that Old-style inner joins will work on 2012 ?? I only have 2008 & 2005 installed here. Do you get a syntax error if you parse code with *= in it ?
February 2, 2014 at 9:33 am
SQL 2012 SP1 CU8 Dev edition, the first of these works fine, second throws the listed error:
SELECT A.*, B.*
FROM A, B
WHERE A.A = B.a
SELECT A.*, B.*
FROM A, B
WHERE A.A *= B.a
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '*='.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
February 2, 2014 at 10:46 am
Thanks !
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply