Basic filter for Query newbie

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to generate a report but filter out some records, depending on the
value of a certain field. From what I can gather reading the posts in the
Reports section, I need to do it from a Query but have no idea how.

This field simply has 1 character in it... and A, B or C etc.

For instance, I want my report to show all records except those that are set
to B, D or F etc

Any help would really be appreciated.
 
To include all the records except b,d,f then tha query will include the
filter not in (a)

Select * From MyTable Where MyField not in ("B","D","F")

If you want the query to return the records that are equal to the value you
want you will write it that way

Select * From MyTable Where MyField in ("A","C","E")
 
Ah... finally.

Thanks very much :)

Ofer said:
To include all the records except b,d,f then tha query will include the
filter not in (a)

Select * From MyTable Where MyField not in ("B","D","F")

If you want the query to return the records that are equal to the value you
want you will write it that way

Select * From MyTable Where MyField in ("A","C","E")
 
Back
Top