Many exclusions in data

  • Thread starter Thread starter KrispyData
  • Start date Start date
K

KrispyData

I want to have 10 exclusion Criteria to my query. For example, let's say
there are 10 states that I do not want to retrieve data for. Would I use the
following in the criteria:

Is Not in ("California","Arizona","Texas", and so on for all 10 states)

Is this correct?
 
I want to have 10 exclusion Criteria to my query. For example, let's say
there are 10 states that I do not want to retrieve data for. Would I use the
following in the criteria:

Is Not in ("California","Arizona","Texas", and so on for all 10 states)

Is this correct?

Ummm... it would have been a lot quicker just to try it than to post and wait
for an answer.

Actually leave off the "is". You can use either IN (<list>) or NOT IN
(<list>).
 
If you have a very long list then you can use a table as below --
SELECT Table2.*
FROM Table2 LEFT JOIN LookUp1 ON Table2.Name = LookUp1.LongName
WHERE (((LookUp1.LongName) Is Null));

Or use list as positive criteria --
SELECT Table2.*
FROM Table2 INNER JOIN LookUp1 ON Table2.Name = LookUp1.LongName;
 
Back
Top