January 21, 2008 at 9:26 am
I just want some clarification here.
Is this
SELECT
*
FROM
dbo.CLMASTER AS Mstr
,dbo.CLCOLLBAL AS Clbl
,dbo.CLPARMS AS Parm
WHERE
Mstr.ACCOUNT = Clbl.ACCOUNT
AND Mstr.COMPANY = Clbl.COMPANY
AND Parm.SKEY = 'CO'
AND Parm.CODE = 'PERIOD'
AND Parm.COMPANY = 'MAIN'
The SAME as
SELECT
*
FROM
dbo.CLMASTER AS Mstr
INNER JOIN dbo.CLCOLLBAL AS Clbl
ON Mstr.ACCOUNT = Clbl.ACCOUNT
AND Mstr.COMPANY = Clbl.COMPANY
CROSS JOIN dbo.CLPARMS AS Parm
WHERE
AND Parm.SKEY = 'CO'
AND Parm.CODE = 'PERIOD'
AND Parm.COMPANY = 'MAIN'
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgJanuary 21, 2008 at 9:44 am
They look the same to me. The join between CLMASTER and CLCOLLBAL is an inner Join since you are joining on specific columns being equal and the Join to CLPARMS is a cross join since there is no join criteria. Have you looked at http://www.sqlservercentral.com/articles/Basic+Querying/2937/ for some clarification on Joins.
Try running the 2 queries on your data and make sure the output is the same in case you've missed something.
Francis
January 21, 2008 at 10:38 am
I fully understand joins, but I'm just not familiar with the older syntax (non-ANSI) standard use of them.
I've ran tests and it seems to be correct, I just wanted clarification on what I thought.
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgViewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply