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
 Transact-SQL (2000)
 OUTER JOIN WHERE NULL

Author  Topic 

cjpsx
Starting Member

34 Posts

Posted - 2006-06-14 : 11:46:45
I want to pull IDs that are NOT in another table. I prefer not to use a subquery but the code below is not working. Is there another SQL Server way?

LEFT OUTER JOIN dbo.araccountbankinfo AS abi
ON (abi.araccountid = ar.araccountid)
WHERE (abi.achbillind IS NULL)


Thanks,
cj

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-06-14 : 12:17:09
what do you mean it's not working?
can you provide sample data and table structure?

Go with the flow & have fun! Else fight the flow
Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"]
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-06-14 : 12:28:29
If araccountid is the primary key of the araccountbankinfo table, this is most likely what you want.

LEFT OUTER JOIN dbo.araccountbankinfo AS abi
ON (abi.araccountid = ar.araccountid)
WHERE ( abi.araccountid IS NULL)

CODO ERGO SUM
Go to Top of Page
   

- Advertisement -