How to get records that dont match???

knowledge76

Registered User.
Local time
Today, 09:54
Joined
Jan 20, 2005
Messages
165
Hi friends,
I was working on a problem to get records that match in a table with the help of left function in my queries, now i want to get all records that dont match the criteria.How can I implement this in MS Access?
I was using in my queries the logic
(table1.[col1] = left(table2.[col1],4))
 
not sure if it works but try putting NOT in front of your expression
 
Not sure too but what about table1.[col1] <> left(table2.[col1],4) ??
 
Knowledge,

If you have to see both "sides":

Code:
Select Table1.[Col1] As NotInTable2
From   Table1 Left Join Table2 On
          Table1.[col1] = left(Table2.[col1],4)
Where  Table2.[Col1] Is Null

Union

Select Left(Table2.[col1],4) As NotInTable1
From   Table2 Left Join Table1 On
          Left(Table2.[col1],4) = Table1.[col1]
Where  Table1.[Col1] Is Null

Wayne
 

Users who are viewing this thread

Back
Top Bottom