excluding a field which exists in another table

sjs01

Registered User.
Local time
Today, 21:48
Joined
Feb 23, 2006
Messages
12
Hi All,

Say you've got 2 tables and you want to extract data from table 1 but exclude all records from table 1 which have a field value existing in table 2?

Table 1 fields:
Test_Code
Test_Desc

Table 2 fields:
Test_Code

Therefore, I would like to query out from Table 1 all Test_Code values which do not exist in Table 2. Any ideas please?
 
In your add both tables
create a join between table1.testcode and table2.testcode
right click on the join and select option 2 (include all records from table1 and only those records from table2 where the join fields are equal)

Select the colums you want from table1 and also the testcode column from table2 in the criteria section of the testcode column from table2 type isnull
 
thanks

thanks for that - worked!!
 

Users who are viewing this thread

Back
Top Bottom