Exists Question

  • Thread starter Thread starter ThePandaManCan
  • Start date Start date
T

ThePandaManCan

Hey all,

Here's my problem: I have two tables, one has information about
customers including a field that holds a "link" to a unique identifier
(that is, it identifies which store a particular customer is registered
at). The second table holds all of the store ids.

SELECT [table_2-1].[NAME]
FROM [table_2-1] INNER JOIN table_2-2_storenums ON
[table_2-1].[LINKTOSTORE]=[table_2-2_storenums].[storenum]
WHERE Not Exists (Select [table_2-1].LINKTOSTORE from [table_2-1] where
[table_2-1].LINKTOSTORE like [table_2-2_storenums].storenum);

Despite the fact that I can see with my own eyes a record that does not
match, this query returns no results.

Any ideas?

-The Panda Man
 
Nevermind... I should have done a left-join instead of an inner join
and then tested for null.

:-P

-The Panda Man
 
Back
Top