where clause <

  • Thread starter Thread starter Zanstemic
  • Start date Start date
Z

Zanstemic

SELECT Events.EventID, Events.EventName
FROM Events
WHERE (((Events.EventID)<27))
ORDER BY Events.EventName;

Currently the query is showing everything in the event list from 1 though
27. I would also like to hide 13, 14, 15, 16.

In Query builder the <27 is in the Criteria field.

Any suggestions on how to best approach this?

Thanks in advance for the help.
 
SELECT Events.EventID, Events.EventName
FROM Events
WHERE (((Events.EventID)<27))
ORDER BY Events.EventName;

Currently the query is showing everything in the event list from 1 though
27. I would also like to hide 13, 14, 15, 16.

In Query builder the <27 is in the Criteria field.

Any suggestions on how to best approach this?

Thanks in advance for the help.

Set the criteria to (using 2 lines as below):
Between 1 and 12
Between 17 and 27

If 27 is the maximum value in any record then you could also use:
<13

By placing the criteria on 2 lines you are creating an "OR" critieria.
 
try:

SELECT EventID, EventName FROM Events
WHERE (EventID < 27 )
and
(eventID not in (13,14,16) )
ORDER BY EventName;
 
Back
Top