VBA Code to omit certain records

A

Alberta Rose

Good day. I have a query that I need to omit certain cost codes/cost types.
I know how to narrow the search by using the "like" command, is there a
command I can use against the three that I do not want included?
 
M

MGFoster

Alberta said:
Good day. I have a query that I need to omit certain cost codes/cost types.
I know how to narrow the search by using the "like" command, is there a
command I can use against the three that I do not want included?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the NOT IN () syntax:

WHERE cost_code NOT IN ("code1", "code2", "code3")

Use your code type names in place of my example names.

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSpLa4IechKqOuFEgEQIlyQCdE5M7/yT31CtZKuFgvcmUNeMppkIAoNcY
kM2zSddKV3MJnceUstiw8iuc
=hL3E
-----END PGP SIGNATURE-----
 

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

Top