I have 2 identic tables: T1 and T2 which contain only one field NR.
T1 contains the data:
1
2
3
4
5
6
7
8
9
10
11
12
T2 contains the data:
5
6
7
8
A
B
C
D
I want to select all the records found in T1, but not found in T2. So, I wrote the following SQL query:
SELECT T1.NR
FROM T1
WHERE NOT EXISTS
(select T2.NR
from T2);
Unfortunately, this query doesn`t return any record. And the strangest thing is that the query:
SELECT T1.NR
FROM T1
WHERE NOT EXISTS
(select T2.NR
from T2);
have the same effect like:
SELECT * FROM T1,
I mean it returns all the records of T1. I mention that the query was written in Access. What I have to do? Can anybody help me? What solutions do I have? I need a query, not a VBA code!
Thank you in advance!
T1 contains the data:
1
2
3
4
5
6
7
8
9
10
11
12
T2 contains the data:
5
6
7
8
A
B
C
D
I want to select all the records found in T1, but not found in T2. So, I wrote the following SQL query:
SELECT T1.NR
FROM T1
WHERE NOT EXISTS
(select T2.NR
from T2);
Unfortunately, this query doesn`t return any record. And the strangest thing is that the query:
SELECT T1.NR
FROM T1
WHERE NOT EXISTS
(select T2.NR
from T2);
have the same effect like:
SELECT * FROM T1,
I mean it returns all the records of T1. I mention that the query was written in Access. What I have to do? Can anybody help me? What solutions do I have? I need a query, not a VBA code!
Thank you in advance!