Kamis, 27 November 2014

Re: [MS_AccessPros] Error: Could not delete from the specified tables (MS Access 2010 or 2013)

 

Norbert-


This might work:

DELETE tblPayor.*
FROM tblMaster RIGHT JOIN tblPayor ON tblMaster.IsmaId2 = tblPayor.IsmaId
WHERE (((tblMaster.IsmaId2) Is Null));

A more correct SQL Standard way to do this is:

DELETE tblPayor.*
FROM tblPayor
WHERE tblPayor.IsmaId NOT IN 
(SELECT IsmaId2 FROM tblMaster);


John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Nov 27, 2014, at 7:01 PM, drnorbert@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hi,

When running the following query I am getting an error:


Could not delete from the specified tables.



DELETE tblMaster.IsmaId2, tblPayor.*
FROM tblMaster RIGHT JOIN tblPayor ON tblMaster.IsmaId2 = tblPayor.IsmaId
WHERE (((tblMaster.IsmaId2) Is Null));



Thanks.

Norbert


__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar