Retrieving all rows from one table except those which have same values for the first column in the second table
Hello,
I have two tables. I want to select all rows from the first table, except those rows, which values are equal with the values in the first column of the secon table. The second table uses the values from the first table for its first column.
For example now with my incorrect select query I get:
GBR Garbr Nadvor P1 P2 P3 Pzd
1001 True False False False False
1001 False False False False False
1001 True False False False False
1001 True False True False False
1001 False False True True False
1001 True False False True False
1001 False True True False False
1001 False True True False False
1001 True False False True False
1001 True False False False True
1001 True False False False True
1001 True False False False True
1001 True False False True False
1001 True False False False False
1001 True False False False False
1001 True False False False False
1001 True False False False False
1001 True False False False False
1001 True False True False False
1001 True True False False False
1001 True False False True False
1001 True False False False False
1001 True False False False False
1001 1004 True False True False False
1001 1016 True False False False True
1001 1013 False False True False False
1002 True False False False False
1002 False False False False False
1002 True False False False False
1002 1004 True False True False False
1002 1016 True False False False True
1002 1013 False False True False False
1004 True False False False False
1004 False False False False False
1004 True False False False False
1004 True False True False False
1004 False False True True False
1004 True False False True False
1004 False True True False False
1004 False True True False False
1004 True False False True False
1004 True False False False True
1004 True False False False True
1004 True False False False True
1004 True False False True False
1004 True False False False False
1004 True False False False False
1004 True False False False False
1004 True False False False False
1004 True False False False False
1004 True False True False False
1004 True True False False False
1004 True False False True False
1004 True False False False False
1004 True False False False False
1004 1004 True False True False False
1004 1016 True False False False True
1004 1013 False False True False False
And I want 1001 to appear only once, as well as 1002, 1003, and 1004 shouldn't appear, since it occures in the second table, it can be seen in the second column.
Can anybody help me please?
Thanks in advance.