WHERE criteria
I am trying to outpu some records using WHERE. I want
only records where employee contains name1, name2, name3,
name4, name5, name6 AND approved = No. I can get either
all records where approved = No or all records where
employee contains name1...., but not both. Here is my
query:
WHERE (approved = '%No%') AND (employee LIKE '%name1%' OR
employee LIKE '%name2%' OR employee LIKE '%name3%' OR
employee LIKE '%name4%' OR employee LIKE '%name5%')
ORDER BY employee ASC, period_ending DESC
Thanks for the help!
Darren
|