Delete Query?

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

I used the 'Find Unmatched Query Wizard' to create a qurey.
It worksd great!
I want to use that qurey results to delete the records from the table.
How do I select the table to delete from?

SELECT DISTINCTROW tblSignalsCal.SIGID
FROM tblSignalsCal LEFT JOIN qrySignalsCalculated ON tblSignalsCal.SIGID =
qrySignalsCalculated.SIGI
WHERE (((qrySignalsCalculated.SIGI)=""));
 
See Jet SQL Syntax.

DELETE FROM <table>
WHERE <condition>

E.g.
DELETE FROM tblSignalsCal
WHERE NOT EXISTS
(SELECT *
FROM qrySignalsCalculated
WHERE qrySignalsCalculated.SIGI = tblSignalsCal.SIGID
)

[Of course a good SQL database should understand, Access should so too]

- Joris
 

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

Back
Top