MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 31st, 2004, 02:09 AM
Murali D Murali D is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 2 Murali D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face difference in queries

Hi
I am pretty new to database. I want to know the difference between the 2 queries given below

1> SELECT B.col4, A.col4 , A.col5, C.col5
from tbltpcheckout A with (nolock)
inner join tblTPEFTPayPal B with (nolock)
on A.col1 = B.col1
inner join tbltpuser C with (nolock)
on A.col3 = C.col3
where A.col2 = CONTP_CHECKOUT_STATUS_PENDING


2> SELECT B.col4, A.col4 , A.col5, C.col5
from tbltpcheckout A with (nolock) ,
tblTPEFTPayPal B with (nolock),
tbltpuser C with (nolock)
where
A.col1 = B.col1 and
A.col3 = B.col3 and
A.col2 = CONTP_CHECKOUT_STATUS_PENDING

If any one can help me in understanding the difference

Thanks
Murali

Reply With Quote
  #2  
Old July 31st, 2004, 10:56 AM
swampBoogie swampBoogie is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2003
Location: Paris Uppland
Posts: 1,775 swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 16 h 2 m 7 sec
Reputation Power: 37
if this

Code:
 A.col3 = B.col3 and 


is a mistype for

Code:
A.col3 = C.col3 and 


then there is no difference

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > difference in queries


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway