Hi,
I'm trying to delete all the records returned in a SELECT statment, but I can't seem to get the syntax right.
I've tried:
and
But neither seem to do the trick.
If it's of any use, I'm currently using MS Access, with the SQL in ASP (I thought I'd ask here and get the ANSI syntax first, then worry about any MS differences!).
The SELECT by itself returns all the desired records I'm trying to delete.
I'm trying to delete all the records returned in a SELECT statment, but I can't seem to get the syntax right.
I've tried:
Code:
DELETE * FROM (SELECT * FROM table_x WHERE field_x = x)
and
Code:
DELETE FROM (SELECT * FROM table_x WHERE field_x = x)
But neither seem to do the trick.
If it's of any use, I'm currently using MS Access, with the SQL in ASP (I thought I'd ask here and get the ANSI syntax first, then worry about any MS differences!).
The SELECT by itself returns all the desired records I'm trying to delete.