I
IceBock
Hi
I am executing the following queryin Access:
Query #1)
SELECT Table2.* FROM Table2
WHERE (((Table2.matchColumn) Not In (select DISTINCT table1.matchColumn from
table1)));
The column matchColumn in table2 and table1 are not unique. What I try to
do is to remove rows from table2 if they are in table1 (on the match column).
The problem is that i get random results with my query. Some time, i got
1515 rows returned by the query, somes other times, i got 1514 or 1516 rows
returned.
By adding the "distinct" word before table2 (see query #2), i get stable
result on the number of returned rows (and the correct number of rows by the
way).
I am not sure tought I should use distinct before table2 as I only wish to
eliminate rows from table2 if they are present in table1.
So the question is whi Access return me random result from table1 and also
are the query 2 better than the one to do what i want ?
Query #2)
SELECT Table2.* FROM Table2
WHERE (((Table2.correspondance) Not In (select DISTINCT
table1.correspondance from table1)));
Thanks
Patrick Blanchette
I am executing the following queryin Access:
Query #1)
SELECT Table2.* FROM Table2
WHERE (((Table2.matchColumn) Not In (select DISTINCT table1.matchColumn from
table1)));
The column matchColumn in table2 and table1 are not unique. What I try to
do is to remove rows from table2 if they are in table1 (on the match column).
The problem is that i get random results with my query. Some time, i got
1515 rows returned by the query, somes other times, i got 1514 or 1516 rows
returned.
By adding the "distinct" word before table2 (see query #2), i get stable
result on the number of returned rows (and the correct number of rows by the
way).
I am not sure tought I should use distinct before table2 as I only wish to
eliminate rows from table2 if they are present in table1.
So the question is whi Access return me random result from table1 and also
are the query 2 better than the one to do what i want ?
Query #2)
SELECT Table2.* FROM Table2
WHERE (((Table2.correspondance) Not In (select DISTINCT
table1.correspondance from table1)));
Thanks
Patrick Blanchette