I'm having a problem updating a table using a query to select the correct number of records.
When I used a second table to perform the INNER JOIN, the query ran and upated the table, but unfortunately it updated more records (50) than it should have done.
because the "Part" field is not unique.
I tried to use a query to force selection of the correct number of records (25)
When I test the update query it pulls up the correct records, but when I run the query I get the error:-
"Operation must use an updateable query"
The problem is not permissions as I can update the table, just not by using the statement I want!
J.
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
When I used a second table to perform the INNER JOIN, the query ran and upated the table, but unfortunately it updated more records (50) than it should have done.
Code:
UPDATE XREF_MATNR_TO_PART
INNER JOIN Part_Master ON XREF_MATNR_TO_PART.Part = Part_Master.pt_part
SET XREF_MATNR_TO_PART.Part = ""
WHERE (((Part_Master.[Sub-category])="RECOVERED BULK"));
because the "Part" field is not unique.
I tried to use a query to force selection of the correct number of records (25)
Code:
qryBISMT:
SELECT qryPart_Master.[Sub-category], qryPart_Master.pt_part, qryPart_Master.MATNR
FROM qryPart_Master
WHERE (((qryPart_Master.[Sub-category])="RECOVERED BULK"));
Code:
UPDATE XREF_MATNR_TO_PART
INNER JOIN qryBISMT ON XREF_MATNR_TO_PART.MATNR = qryBISMT.MATNR
SET XREF_MATNR_TO_PART.Part = ""
WHERE (((qryBISMT.[Sub-category])="RECOVERED BULK"));
When I test the update query it pulls up the correct records, but when I run the query I get the error:-
"Operation must use an updateable query"
The problem is not permissions as I can update the table, just not by using the statement I want!
J.
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)