Delete Query Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

DELETE DISTINCTROW MayCum_ACC.*, MayCum_ACC.LOAN
FROM MayCum_ACC, AIC_050605
WHERE (([MayCum_ACC]![LOAN]=[AIC_050605]![LOAN]));


I thought this would be simple. Two tables common data that I want to
delete. When I do the preview it shows me the records that I want to delete,
but when I try to run the query I get "Operation must use an updatable query"
 
DELETE DISTINCTROW MayCum_ACC.*, AIC_050605.LOAN
FROM MayCum_ACC INNER JOIN AIC_050605 ON MayCum_ACC.LOAN = AIC_050605.LOAN
WHERE (((AIC_050605.LOAN)=[AIC_050605]![LOAN]));


I think I fixed it with the above SQL. I swear I tried it before and it
didn't work, got the error message below, but now it seems ok.....hmmmm B.
Gates must be messing with me
 
I have run into this problem myself. In your records add a one position
field. I call mine DelTag. Update this field with the Letter "X" (You can
use any character you want as long as you do not duplicate it)

Then call two simple Delete queries where you delete the records that have
the Letter "X" in the Deltag Field.
 
I think there is a big difference between the 2 SQLs.

In the second SQL, you use INNER JOIN while in the first SQL, you use
Cartesian Join, i.e. no join at all.

HTH
Van T. Dinh
MVP (Access)



Gary_S said:
DELETE DISTINCTROW MayCum_ACC.*, AIC_050605.LOAN
FROM MayCum_ACC INNER JOIN AIC_050605 ON MayCum_ACC.LOAN = AIC_050605.LOAN
WHERE (((AIC_050605.LOAN)=[AIC_050605]![LOAN]));


I think I fixed it with the above SQL. I swear I tried it before and it
didn't work, got the error message below, but now it seems ok.....hmmmm B.
Gates must be messing with me









Gary_S said:
DELETE DISTINCTROW MayCum_ACC.*, MayCum_ACC.LOAN
FROM MayCum_ACC, AIC_050605
WHERE (([MayCum_ACC]![LOAN]=[AIC_050605]![LOAN]));


I thought this would be simple. Two tables common data that I want to
delete. When I do the preview it shows me the records that I want to delete,
but when I try to run the query I get "Operation must use an updatable query"
 
Back
Top