Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 28th, 2008, 09:17 AM
jjb jjb is offline
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could someone advise me on the following
I am in the very early stages of the process of migrating an application from using an access 97 database (jet 3.51) to a sql server 2005 express database.
As part of my learning curve I was reading John Connell's book (Beginning vb6 databases). In this he said that "outer joins" via the jet engine applied the filtering of the "where" clause before the tables are joined whereas the "outer join" in sql server applied the filter after the joining of the tables.
That this was because SQL server was developed before the ANSI standard was brought in whereas Access 97 complied with ANSI standards.
As my application has hundreds of these joins in the code this was a bit of a shock.
This thread seems to suggest that SQL server 2005 now does joins the same way as Access 97.
Is this correct?
Thanks

 
Old September 8th, 2008, 04:27 PM
jjb jjb is offline
Registered User
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'll take that as ..um..a yes?

 
Old September 8th, 2008, 08:29 PM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

Probably not... I'd say the silence means that no one knows off the top of their head.

--Jeff Moden
 
Old September 9th, 2008, 07:53 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

SQL Server 2000 (and maybe before that, but surely with 2000) does the WHERE clause after the JOIN.

I have an old post that demos this and the side effects and and and.

http://www.aspmessageboard.com/forum...96501&F=20&P=1

And SQLTeam.com (a site that specializes in SQL Server) has a similar thread/article:

http://www.sqlteam.com/item.asp?ItemID=11122

But quite frankly, I thought that this action *WAS* in compliance with the ANSI spec. *AND* the actual test that I performed, as I showed it in my post noted above, was run on an Access2002 database!!! So if Access97 is different, then *IT* is the "odd man out" here.
 
Old September 9th, 2008, 08:02 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Just because it had been so many years since I wrote that post, I wanted to ensure that senility hasn't yet set in.

It hasn't.

I just tried it with Access2003 and indeed Access *DOES* apply the WHERE *AFTER* the JOIN. So... I dunno if Access97 really was different, but I tend to doubt it. JJB: I think you misread or misremember that article. I think SQL Server *USED* to do the WHERE *before* the JOIN (when it used the old style joins) and *NOW* it does them after, same as Access has always done.

If you don't believe me about Access, I'd be happy to send you a ".mdb" file that proves what I say.





Similar Threads
Thread Thread Starter Forum Replies Last Post
left outer join keyvanjan Classic ASP Basics 1 April 15th, 2006 05:37 AM
left outer join keyvanjan Classic ASP Professional 0 February 5th, 2006 11:54 AM
Outer Join, 2 columns jking SQL Language 1 December 5th, 2004 04:14 AM
outer join on same table roog SQL Language 4 September 30th, 2004 05:31 AM
T-SQL Outer join query jaucourt SQL Server 2000 5 June 2nd, 2004 10:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.