October 18, 2012 at 3:31 pm
Hi,
I'll probably explain this wrong...
I have a 'provider' table, a provider_to_Provider_identifier, and a provider_Identifier table
On the front end if a user puts in a identifier, it loads the data to the link table (provider_to_Provider_identifier) and provider_identifier
it does not if one isn't entered . I want to report on providers that do not have a link to that table, tehrefore dont have a identifier
Thanks in Advance
Joe
October 18, 2012 at 3:36 pm
Sounds like you want a NOT EXISTS or NOT IN.
SELECT <stuff> FROM Table WHERE NOT EXISTS (SELECT 1 FROM AnotherTable WHERE Table.JoinColumn = AnotherTable.JoinColumn)
SELECT <stuff> FROM Table WHERE Table.JoinColumn NOT IN (SELECT AnotherTable.JoinColumn FROM AnotherTable)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 19, 2012 at 8:00 am
Than you.. works great!!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply