Go Back   Access World Forums > Microsoft Access Discussion > Queries

Thread Tools Rate Thread Display Modes
Old 03-24-2015, 08:03 AM   #1
Newly Registered User
Join Date: Mar 2008
Location: London, UK
Posts: 162
Thanks: 35
Thanked 7 Times in 7 Posts
winshent is on a distinguished road
DELETE Queries with Joins

I'm really confused with this..

I have two queries, both delete from the same table and both have joins...

This one works:
DELETE  RequestCheck.*
SELECT TOP 3 PayRequest.RequestID, PayRequest.GBPAmount, PayRequest.Currency, PayRequest.RequestDate
FROM PayRequest
WHERE (((PayRequest.Currency)="EUR Euro") AND ((PayRequest.RequestDate)>#11/16/2014#))
ORDER BY PayRequest.GBPAmount
) AS TOP3 INNER JOIN RequestCheck ON TOP3.RequestID = RequestCheck.RequestID
WHERE (((RequestCheck.CheckID)=8));
This one does not:
DELETE RequestCheck.*
FROM 300_tblDeleteRequestCheck INNER JOIN RequestCheck ON [300_tblDeleteRequestCheck].RCID = RequestCheck.RCID;
Can anyone make sense of this ?

winshent is offline   Reply With Quote
Old 03-24-2015, 09:11 AM   #2
Super Moderator
jdraw's Avatar
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 11,681
Thanks: 61
Thanked 1,903 Times in 1,853 Posts
jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice jdraw is just really nice
Re: DELETE Queries with Joins

This syntax works fine for me (seems similar to yours)
 DELETE Animal.*
FROM Animal INNER JOIN AnimalDeletes
 [AnimalDeletes].DelID = Animal.AnimalID;
Attached jpg shows Animal table after the query; and AnimalDeletes shows records to be deleted.
Attached Images
File Type: jpg AnimalRelatedTables.jpg (15.5 KB, 65 views)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jdraw is offline   Reply With Quote

delete , join

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Queries with joins to filter list box Lambo Forms 19 02-19-2014 02:35 AM
Joins and Queries 5 Stones Queries 3 09-09-2007 11:59 PM
VB, SELECT queries, Inner Joins, and trouble! Junkee Brewster Modules & VBA 2 10-03-2005 03:30 AM
Joins in Queries dcjones General 1 04-13-2004 08:22 PM
Joins in queries geoffD Queries 4 01-03-2004 10:49 AM

All times are GMT -8. The time now is 04:30 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World