Unable to Delete After Unmatched Query

Ksabai

Registered User.
Local time
Yesterday, 16:44
Joined
Jul 31, 2017
Messages
104
The Following is my Sql, iam able find the record to delete but iam unable to delete as its Says "Specify the table Containing the records you want to delete"

DELETE tblBciCMiA.ContNo, tblBciCMiA.InvNo, tblBciCMiA.Seller, tblBciCMiA.Buyer, tblBciCMiA.Qty, tblBciCMiA.Cert, tblBciCMiA.RQty, tblBciCMiA.RDate, qryBciCMiA.qInvNo
FROM tblBciCMiA LEFT JOIN qryBciCMiA ON tblBciCMiA.[InvNo] = qryBciCMiA.[qInvNo]
WHERE (((qryBciCMiA.qInvNo) Is Null));
 
like it says, which table to delete?
obviously from tblBciCMiA.

DELETE tblBciCMiA.* FROM tblBciCMiA LEFT JOIN qryBciCMiA ON tblBciCMiA.[InvNo] = qryBciCMiA.[qInvNo]
WHERE (((qryBciCMiA.qInvNo) Is Null));

!!!BACKUP first your table!!!
 
There is no need to specify fields in DELETE because entire record is deleted.

If Arnel's suggestion doesn't work, try:

DELETE FROM tblBciCMiA WHERE ID IN (SELECT ID FROM tblBciCMiA LEFT JOIN qryBciCMiA ON tblBciCMiA.[InvNo] = qryBciCMiA.[qInvNo]
WHERE qryBciCMiA.qInvNo Is Null);

Deleting data should be a rare event. Why are you deleting?
 
it works, iam actually just trying how to delete a record.
 
he, he, the best place to practice with thrill and chill is on live data!
 

Users who are viewing this thread

Back
Top Bottom