Not Exists

  • Thread starter Thread starter Wes
  • Start date Start date
W

Wes

Hi All,

I tried to run a not exists statment and Access doesn't
seem to like it. Can you tell me what is the equivlant
statment?

Wes
 
If I understood you correctly.
You are look for records that does not exist in a list.
Try "not in" instead of "not exists".
Example,

TblAll:
Fld1 Fld2 Fld3
---- ---- ----
A 1 2
B 3 4
C 5 6

Select Fld1, Fld2, Fld3 from TblAll
where Fld1 not in ("C", "D", "E", "F");

It will return
Fld1 Fld2 Fld3
---- ---- ----
A 1 2
B 3 4
 
Hi All,

I tried to run a not exists statment and Access doesn't
seem to like it. Can you tell me what is the equivlant
statment?

Wes

Access does indeed support the NOT EXISTS clause, if you enter it
correctly:

SELECT <fields> FROM <table>
WHERE NOT EXISTS(SELECT <a single field> FROM <another table> WHERE
<criteria>);

Could you post the SQL of the query that isn't working, and the error
that you're getting?
 
Back
Top