Access Query Help

  • Thread starter Thread starter Rock
  • Start date Start date
R

Rock

I have a query that selects about 10 fields, one of which is called
CODE. The value I'm looking for is where code = AAAA. (this is an
example..) I get a return of 100 records or so. Now I want to flip
this and return those records that do not have a code that equals to
AAAA.

I've tried Where NOT Exists (AAAA) but I get a syntax error...can some
one help with the syntax when using this type of query...or am I going
about it all wrong? Thanks!
 
<> "AAAA"

Not quite:

WHERE (code <> 'AAAA' OR code IS NULL);

Perhaps the OP was trying for this alternative:

WHERE NOT EXISTS (
SELECT *
FROM TheSameTable AS T2
WHERE T2.code = 'AAAA'
);

Jamie.

--
 
Back
Top