Record Matching

  • Thread starter Thread starter carl
  • Start date Start date
C

carl

I have a database that looks like this:

Type Code ItemID
A BOX1 999
B BOX2 998
C BOX3 997
D BOX4 996
E BOX5 995


I would like a query which will return all records where Type is equal to
A,C,D.


Type Code ItemID
A BOX1 999
C BOX3 997
D BOX4 996


Thank you in advance.
 
SELECT * FROM MyTable WHERE [Type] IN ('A','C','D');
If you have the list of wanted types saved in a table you would do it a
different way.
SELECT * FROM MyTable WHERE [Type] IN (SELECT [Type] FROM MyListOfTypes);
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Back
Top