T
Tom
It's been a while since I've played with delete queries, so this is
*probably* something simple that I'm just not seeing...
I have two tables and queries. One table has a lot of rows
(tblElecRateReviewDetail). Some of these rows I need to delete. One
of my two queries works just fine, as I only neeed to match the
contents of one field in the row, to select the rows I want to delete.
Here is the query...
DELETE
tblElecRateReviewDetail.[RD Type]
FROM
tblElecRateReviewDetail
WHERE
(((tblElecRateReviewDetail.[RD Type])="F" Or
(tblElecRateReviewDetail.[RD Type])="I" Or
(tblElecRateReviewDetail.[RD Type])="O" Or
(tblElecRateReviewDetail.[RD Type])="S"));
My second table (tblElecRateReview_Finals) contains the data I need to
select the remaining rows that I need to delete from table 1. This is
what I cannot get to work. I get an error:
"Specify the table containing the records you want to delete."
Here is the query...
DELETE
tblElecRateReviewDetail.[RD Type]
FROM
tblElecRateReviewDetail RIGHT JOIN tblElecRateReview_Finals ON
(tblElecRateReviewDetail.[Loc ID] = tblElecRateReview_Finals.[Loc
ID]) AND
(tblElecRateReviewDetail.[Read YY] = tblElecRateReview_Finals.[Read
YY]) AND
(tblElecRateReviewDetail.[Read MM] = tblElecRateReview_Finals.[Read
MM])
WHERE
(((tblElecRateReviewDetail.[RD Type])="R"));
I'm using Access 2000. I need to match the "Loc ID", "Read YY" and
"Read MM" fields for all the rows in table 1 where "RD Type"="R". (At
this point *all* the rows in table one contain "R" in "RD Type". So I
have to select the rows using the other three fields.)
If someone would be so kind as to give me a push in the right
direction, I would appreciate it.
Thank you in advance,
Tom
*probably* something simple that I'm just not seeing...
I have two tables and queries. One table has a lot of rows
(tblElecRateReviewDetail). Some of these rows I need to delete. One
of my two queries works just fine, as I only neeed to match the
contents of one field in the row, to select the rows I want to delete.
Here is the query...
DELETE
tblElecRateReviewDetail.[RD Type]
FROM
tblElecRateReviewDetail
WHERE
(((tblElecRateReviewDetail.[RD Type])="F" Or
(tblElecRateReviewDetail.[RD Type])="I" Or
(tblElecRateReviewDetail.[RD Type])="O" Or
(tblElecRateReviewDetail.[RD Type])="S"));
My second table (tblElecRateReview_Finals) contains the data I need to
select the remaining rows that I need to delete from table 1. This is
what I cannot get to work. I get an error:
"Specify the table containing the records you want to delete."
Here is the query...
DELETE
tblElecRateReviewDetail.[RD Type]
FROM
tblElecRateReviewDetail RIGHT JOIN tblElecRateReview_Finals ON
(tblElecRateReviewDetail.[Loc ID] = tblElecRateReview_Finals.[Loc
ID]) AND
(tblElecRateReviewDetail.[Read YY] = tblElecRateReview_Finals.[Read
YY]) AND
(tblElecRateReviewDetail.[Read MM] = tblElecRateReview_Finals.[Read
MM])
WHERE
(((tblElecRateReviewDetail.[RD Type])="R"));
I'm using Access 2000. I need to match the "Loc ID", "Read YY" and
"Read MM" fields for all the rows in table 1 where "RD Type"="R". (At
this point *all* the rows in table one contain "R" in "RD Type". So I
have to select the rows using the other three fields.)
If someone would be so kind as to give me a push in the right
direction, I would appreciate it.
Thank you in advance,
Tom