March 12, 2004 at 12:09 am
Hi,
I am still using the old style syntax for Outer join in almost all my queries, can somebody throw some light on the differences between the ansi joins to old style outer joins, I also heard from one of my friends that results of the old style outer joins and the ansi joins may not be same as filtering mechanism is not same in this two versions. It will really helpful if someone can post the links where I can find more information on this issue so that I can migrate my old queries to the new format.
Thanks in advance.
Prasad Bhogadi
www.inforaise.com
March 12, 2004 at 4:01 am
Here is the sample
March 12, 2004 at 4:08 am
Oops, I do not see any sample. Can U pls check again.
Thanks
Prasad Bhogadi
www.inforaise.com
March 12, 2004 at 4:14 am
Sample in PSS ID Number: 176480
Old style outer join in pubs database
SELECT titles.title_id, title, qty
FROM titles, sales
WHERE titles.title_id *= sales.title_id
AND stor_id = '7066'
is not the same as
SELECT titles.title_id, title, qty
FROM titles LEFT OUTER JOIN sales
ON titles.title_id = sales.title_id
WHERE stor_id = '7066'
The ansi version is actually becomes inner join. The correct conversion should be
SELECT titles.title_id, title, qty
FROM titles LEFT OUTER JOIN sales
ON titles.title_id = sales.title_id
AND stor_id = '7066'
March 12, 2004 at 4:21 am
My goodness I am so ignorant, I thought Left Outer Join itself is been replaced with some other syntax based on what I heard, I now believe that I am using the correct ANSI syntax and I donot need to change anything.
Thanks alot for the quick response.
Prasad Bhogadi
www.inforaise.com
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply