Can not delete from specified Tables

  • Thread starter Thread starter c8tz
  • Start date Start date
C

c8tz

Below is my SQL Code - Confirmation Entries such that if PalmHeight1 =
PalmHeight2 then Delete that entry in the second table.


DELETE PalmHeight.Height, PalmHeightSecond.*, PalmHeight.RDate
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));

Am not able to delete.
Trial, Palm, Plot and Date is related.

Is this where the problem is? Such that there are too many relations
and am only dealing with one entry item (Palm Height).

If so, how can I split this query and still get the same result.

Thanks in advance,

Lost!
 
Try:

DELETE DISTINCTROW PalmHeight.*
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));




Below is my SQL Code - Confirmation Entries such that if PalmHeight1 =
PalmHeight2 then Delete that entry in the second table.

DELETE PalmHeight.Height, PalmHeightSecond.*, PalmHeight.RDate
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));

Am not able to delete.
Trial, Palm, Plot and Date is related.

Is this where the problem is? Such that there are too many relations
and am only dealing with one entry item (Palm Height).

If so, how can I split this query and still get the same result.

Thanks in advance,

Lost!
 
Hi Trevor,

Thanks for your reply,

I am now getting runtime error '3008'. The table "PalmHeight" is
already opened exclusively by another user or it is already opened
through the user interface and can not be manipulated
programmatically.

The tables are "links" into the Interface Application. Would this be
the cause? But I've had other entry forms set up similar and it seems
ok -

Please help,

Thanks,

ccholai



Try:

DELETE DISTINCTROW PalmHeight.*
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));




Below is my SQL Code - Confirmation Entries such that if PalmHeight1 =
PalmHeight2 then Delete that entry in the second table.
DELETE PalmHeight.Height, PalmHeightSecond.*, PalmHeight.RDate
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));
Am not able to delete.
Trial, Palm, Plot and Date is related.
Is this where the problem is? Such that there are too many relations
and am only dealing with one entry item (Palm Height).
If so, how can I split this query and still get the same result.
Thanks in advance,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top