| RE: [SQLDownUnder] INNNER JOIN? |
- From: Aaron Bull
- Subject: RE: [SQLDownUnder] INNNER JOIN?
- Date: Wed, 09 Mar 2005 11:01:37 +1100
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
It's an alias now, and the Items.ItemID refers to the top level items table. thats why, select ItemID from Items INNNER JOIN Products ON Items.ItemID = Products.FK_ItemID will cause an error. What are you trying to achieve with the query, is this equivalent select ItemID from Items where ItemID not in (select distinct FK_ItemID from Products) Cheers, Aaron ________________________________ From: SQLDownUnderList@xxxxxxxxxxxxxxxxxxxxxx on behalf of William Luu Sent: Wed 3/9/05 11:05 To: SQLDownUnder@xxxxxxxxxxxxxxxxxxxxxx Subject: [SQLDownUnder] INNNER JOIN? Alright, I was looking through one of my stored procedures and see this following query: select ItemID from Items where not exists (select ItemID from Items INNNER JOIN Products ON Items.ItemID = Products.FK_ItemID) I want to know why my typo (adding an extra 'N' in the INNER word), actually yielded results, but when I corrected my typo, it didn't yield any results at all. I expect that it's probably something simple like using the wrong type of join in the first place. Cheers, William to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net
<<winmail.dat>>
(Click here for more information on the sqldownunder mailling list)
- Follow-Ups:
- Re: [SQLDownUnder] INNNER JOIN?, William Luu
- Prev by Date: RE: [SQLDownUnder] INNNER JOIN?
- Next by Date: Re: [SQLDownUnder] INNNER JOIN?
- Previous by thread: RE: [SQLDownUnder] INNNER JOIN?
- Next by thread: Re: [SQLDownUnder] INNNER JOIN?
- Index(es):
