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

Delete query with inner join

Status
Not open for further replies.

AccessHelp123

Programmer
Apr 27, 2005
91
US
Hi all,

I am trying to combine a Delete query with inner join. This is what I have

DELETE tableTemp.*
FROM tableTemp INNER JOIN tableSiteStatus ON [tableTemp].[cellidentity]=[tableSiteStatus].[Cell ID]
WHERE ((([tableSiteStatus].[Final Cut-Over Date])="Yes") And (([tableTemp].[networkCC])=0));



I get an error message saying cannot delete from the specified table. Can someone help? Thanks a lot.
 
Possibly that join is non-updatable. If you view it in Datasheet View can you add/update/delete there?

 
You may try something like this:
DELETE FROM tableTemp
WHERE networkCC=0
AND cellidentity In (SELECT [Cell ID] FROM tableSiteStatus WHERE [Final Cut-Over Date]="Yes");

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV. I tried a variety of combinations. This is the only one that seems to work. Thanks Mike but I was gonna use with a button on a form. So it needed to be a query.
 
I just meant use the datasheet to test whether it was updatable or not. PHV's method gets around possible non-updatability but then again you won't have learned why the first one didn't work...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top