Solved Delete Query - Not working (1 Viewer)

Number11

Member
Local time
Today, 12:12
Joined
Jan 29, 2020
Messages
607
Hello,

I am trying to delete all records within a Table greater than the date in another table. I have set the criteria to

> [Delete_SetDate].[AppDate]

The date in the table is set as 31/03/2022 - i am getting this error

1650631831346.png


if i use this criteria it works

>#31/03/2022#

But i need to have it to look up the date in the other table so i dont have to keep manually updating the delete query is this possible please?

I also have another criteria set on Product Name

Is Like "TTmaxDataServ"
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:12
Joined
May 7, 2009
Messages
19,175
delete yourTable.* from yourTable where [Product Name] Like "TTmaxDataServ" And dateField > (select top 1 appDate from delete_setDate)
 
Last edited:

Users who are viewing this thread

Top Bottom