Query

  • Thread starter Thread starter Pass-the-reality
  • Start date Start date
P

Pass-the-reality

I have a query that pulls data into three columns. The three columns are
SPDStatus, PMAStatus and SLStatus. If the data in all three columns are (in
any order) Complete, Complete-Deemed or Roll-up, I do not want that line to
show up. For example: I would not want rows 1 or 2 to show up.

SPDStatus PMA Status SLStatus
Complete Complete Complete
Complete-Deemed Roll-up Complete
Active Review Complete
 
Try this:

SELECT SPDStatus, [PMA Status], SLStatus
FROM [YourTable]
WHERE NOT
(SPDStatus IN ("Complete","Complete-Deemed","Roll-up")
AND [PMA Status] IN ("Complete","Complete-Deemed","Roll-up")
AND SLStatus IN ("Complete","Complete-Deemed","Roll-up"));

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top