Delete query with a subquery

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
-----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-----
 
Back
Top