Pinkab
Pinkab

Reputation: 21

MS-Access WHERE filter syntax

I have a query:

PARAMETERS [Enter From Date:] Text ( 255 ), [Enter To Date:] Text ( 255 );
TRANSFORM Count([Staff Programs].ID) AS CountofProgram
SELECT [Staff Programs].program_name
FROM [Staff Programs]
WHERE ((([Staff Programs].is_noshow)=No) AND (([Staff Programs].actual_date) Between [Enter From date:] And And [Enter To Date:]))
GROUP BY [Staff Programs].program_name
PIVOT [Staff Programs].staff_name;

I need to add one thing to the WHERE clause.

I have a column in the table called "Event Name"> I would like to skip any of the rows where this value is one of: 'Phone Contact', 'Cinician Travel', 'Reporting' or 'Collateral Contact'.

I have been unable to locate the syntax for this.

Upvotes: 0

Views: 37

Answers (1)

forpas
forpas

Reputation: 164064

Use NOT IN:

AND ([Event Name] NOT IN ('Phone Contact', 'Cinician Travel', 'Reporting', 'Collateral Contact'))

I think it's easy to understand, more here

Upvotes: 2

Related Questions