Delete query with a subquery

G

Guest

I would like to delete all records from an item master file that aren't in a
list of items that are used for a bid list process.
I tried to create a delete query with a subquery as a criteria but when I
ran it I got an info box about only one record match my subquery.

Jeff
 
M

MGFoster

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

It'd be nice to see that query. Here's a guess:

DELETE *
FROM table
WHERE id in (select id from another_table where <criteria>)

Use the IN operator instead of the = operator.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

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

iQA/AwUBQkHpW4echKqOuFEgEQKByACg8E21QDw9xca+RTV6/caVQ91/Z4oAoNLA
6h6Z1Rp0WAo0HlKGofH6d11c
=zDEE
-----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