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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Problem

Status
Not open for further replies.

ITbeast

IS-IT--Management
Jul 25, 2006
67
US
Hi,

I am storing some sample data in two tables that reference. When a certain condition occurs, I want that data in those two tables deleted. I'm having a hard time removing those records. Here is my SQL code behing the delete query

DELETE fname_table.FormID, fname_table.name_id, fname_table.first_name
FROM fname_table INNER JOIN dump_temp ON fname_table.FormID=dump_temp.FormID
WHERE ((dump_temp.call_back)=No);


This is for one of the tables. It's the same query for my other table, just different table names. I'm getting the error message: Specify the table containing the records you want to delete
 
Two problems.

First, Access only lets you delete entire rows. If you want to delete certain fields you need to update them to "".

Second, is dump_temp.call_back a yes/no or text field?

HTH,

Alex

It's a magical time of year in Philadelphia. Eagles training camp marks the end of another brutal season of complaining about the Phillies.
 
Perhaps this ?
DELETE fname_table.*
FROM fname_table INNER JOIN dump_temp ON fname_table.FormID = dump_temp.FormID
WHERE dump_temp.call_back = False

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top