By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 2,007 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

Delete queries fail unexplainably

P: n/a
MLH
Take the following SQL:
DELETE tblPreliminaryVINs.*
FROM tblPreliminaryVINs INNER JOIN tblVehicleJobs ON
tblPreliminaryVINs.PVIN = tblVehicleJobs.SerialNum;

Access 97 consistently disallows me to run queries of this
nature. I'm the database owner and the owner of all its
objects and have full admin rights to them all.

I have absolutely zero problems running
DELETE tblPreliminaryVINs.*
FROM tblPreliminaryVINs;
which deletes ALL the records from the table.

But if I try selectively deleting records in tblPreliminaryVINs that
have related records in tblVehicleJobs, A97 gives me a bunch
of - well, to put it truthfully, bullshit errors saying the database
may have been opened in ReadOnly mode or I'm on a network
that doesn't permit me such access - along with more garbage
error conditions that are completely off the mark.
Nov 22 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
MLH
My apologies - I found my earlier post on this topic. Rich P
<rp*****@aol.comanswered and provided the working solution.

DELETE * FROM tblPreliminaryVINs Where PVIN In (Select SerialNum From
tblVehicleJobs);

I am puzzled, though, as to why A97 doesn't run the following SQL:
DELETE tblPreliminaryVINs.*
FROM tblPreliminaryVINs INNER JOIN tblVehicleJobs ON
tblPreliminaryVINs.PVIN = tblVehicleJobs.SerialNum;
Is it just bad code on my part?
Nov 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.