Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Query - Could not delete from specified tables

Status
Not open for further replies.

blizkij

Technical User
Oct 11, 2001
22
AU
Hi,

I have 3 tables. I want to delete all records from the Reply_work table where they match the Call_req table and the last mod date in the call_req table is later than the date in the tbl_refreshdate. It used to work, but for some reason i am now getting the above error. Any ideas? the sql is below.

nikki


DELETE tbl_Reply_Work
FROM tbl_Reply_Work INNER JOIN AHD_call_req ON tbl_Reply_Work.ref_num = AHD_call_req.ref_num
WHERE (((AHD_call_req.last_mod_dt)>(SELECT tbl_refreshdate.date FROM tbl_refreshdate)));
 
Nicki,

Just a thought. Do you have referencial integrity turned on in the relationships between any of the tables that could be causing the problem, Check this out. If its the case, you might want to review whether you shoul use cascade deletions or not.

Cheers,
Steve
 
Have you made any changes to any of the tables involved? I use an archive query that deletes records from a table, and if I add a new field to the table and miss it in the query, then the query doesn't work right.



Linda Adams
Visit my web site for writing and Microsoft Word tips: Official web site for actor David Hedison:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top