I am trying to exclude pulling statuses into my query

  • Thread starter Thread starter Bonni Wilbourne
  • Start date Start date
B

Bonni Wilbourne

Not In ("Completed"," Canceled")

I want to exclude the status of Completed and Canceled from my query. I
tried using different combinations of the above line, but it does not exclude
them.

Any suggestions would be most appreciated.
 
Post the entire SQL Statement you are trying to use.
(Hint: View: SQL from menu, copy and paste)

What you posted should work assuming that the field contains those values - if
the field is a look up field then what you see may very well be different than
what is actually stored in the field.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
From what I understand:

SELECT *
FROM somewhere
WHERE process NOT IN( SELECT process
FROM somewhere
WHERE status IN("completed",
"canceled") )


to remove all process having one of their status equals to completed or to
canceled. I assume data like:

process dateTime status 'fields

1010 2001.01.01 open
.....
1010 2002.02.02 finding financing
....
1010 2002.03.03 canceled




Vanderghast, Access MVP
 
There's a space between the " and word Canceled. Could that be the problem?

If not, post the entire SQL statement.
 
Back
Top