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

Delete Query

Status
Not open for further replies.

GlenLynam

MIS
Jul 26, 2002
121
0
0
Afternoon All,

I have the following delete query...

DELETE Training.*, Personal.PersonID, Courses.CourseID
FROM Courses RIGHT JOIN (Training LEFT JOIN Personal ON Training.PersonID = Personal.PersonID) ON Courses.CourseID = Training.CourseID
WHERE (((Personal.PersonID) Is Null)) OR (((Courses.CourseID) Is Null));

Whenever i try and execute i get the error "Could not delete from specified tables." Any ideas on how to get my query to delete the records??

Thanks in advance

Glen
 
Surely something simple like this? (untested)
Code:
DELETE Training.* 
FROM Courses RIGHT JOIN (Training LEFT JOIN Personal ON Training.PersonID = Personal.PersonID) ON Courses.CourseID = Training.CourseID
WHERE (((Personal.PersonID) Is Null)) OR (((Courses.CourseID) Is Null));
 
No sorry i get the same error message :-(

Thanks for the response any other ideas??

Thanks in advance

Glen
 
It was the unique records setting was set to no for the properties of the query!! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top