Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 join query help

Author  Topic 

thanksfor help
Posting Yak Master

106 Posts

Posted - 2006-10-27 : 16:42:10
Hi,

I understand the outer and inner joins. Is there a way to get rows that not matched in the join.

For example
right join result of two tables A & B

a.item_no b.item_no
Null ABCD
Null PQRS

IJKL IJKL
MNOP MNOP

Is there a way in the join to just get the first two rows without using subqueries. Something like opposite of inner join.

thanks in advance.

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-10-27 : 17:03:14
If item_no in the first table doesn't allow nulls then just add
WHERE a.item_no IS NULL
to your query.

Any reason why you are opposed to a subquery? A subquery and NOT EXISTS would be a good way to create this query too.
Go to Top of Page

thanksfor help
Posting Yak Master

106 Posts

Posted - 2006-10-27 : 17:34:44
thanks for the reply. Currently I am using sub-query for this but I was interested to know if there is any additional information on joins that I am missing to make my life easier.

thanks
Go to Top of Page
   

- Advertisement -