Hi
I am trying to update a linked table which is in a backend Access database on networked drive. To update this table I need to JOIN it to another linked table which is in an SQL server 2008 R2 database. I'm doing this in Access. My SQL is as follows:
UPDATE DART_New_UBRNs_Master
INNER JOIN ccgbish_tbl_drss_master ON left(DART_New_UBRNs_Master.INITIAL_UBRN,4) & mid(DART_New_UBRNs_Master.INITIAL_UBRN,6,4) & right(DART_New_UBRNs_Master.INITIAL_UBRN,4) = ccgbish_tbl_drss_master.UBRN_var
SET DART_New_UBRNs_Master.[NHS Number] = [ccgbish_tbl_drss_master]![NHSNO_var]
WHERE (DART_New_UBRNs_Master.[NHS Number] Is Null AND ccgbish_tbl_drss_master.NHSNO_var Is Not Null)
So I want to fill in the NULL values of [NHS Number] where it exists in the SQL table.
I get the error 'operation must use an updateable query'.
I have checked that there is a Primary key in the Access table as I have seen this quoted as a cause of this error.
I have also seen it suggested this error is caused by an INNER JOIN on a query but both sides are tables.
I have also checked that I can manually update the field DART_New_UBRNs_Master.[NHS Number] in design view
so it isn't anything to do with permissions to update the table. I have run out of suggestions I can find from
other forum posts.
This query has run with no problems for months. However I refreshed my link to the SQL
table this month as it had additional fields added to it which wouldn't appear in the Linked table until
I refreshed the link. There is no Primary Key in the SQL table but as far as I know there never was (it
is managed by another team).
Any ideas why this query is giving this error?
I am trying to update a linked table which is in a backend Access database on networked drive. To update this table I need to JOIN it to another linked table which is in an SQL server 2008 R2 database. I'm doing this in Access. My SQL is as follows:
UPDATE DART_New_UBRNs_Master
INNER JOIN ccgbish_tbl_drss_master ON left(DART_New_UBRNs_Master.INITIAL_UBRN,4) & mid(DART_New_UBRNs_Master.INITIAL_UBRN,6,4) & right(DART_New_UBRNs_Master.INITIAL_UBRN,4) = ccgbish_tbl_drss_master.UBRN_var
SET DART_New_UBRNs_Master.[NHS Number] = [ccgbish_tbl_drss_master]![NHSNO_var]
WHERE (DART_New_UBRNs_Master.[NHS Number] Is Null AND ccgbish_tbl_drss_master.NHSNO_var Is Not Null)
So I want to fill in the NULL values of [NHS Number] where it exists in the SQL table.
I get the error 'operation must use an updateable query'.
I have checked that there is a Primary key in the Access table as I have seen this quoted as a cause of this error.
I have also seen it suggested this error is caused by an INNER JOIN on a query but both sides are tables.
I have also checked that I can manually update the field DART_New_UBRNs_Master.[NHS Number] in design view
so it isn't anything to do with permissions to update the table. I have run out of suggestions I can find from
other forum posts.
This query has run with no problems for months. However I refreshed my link to the SQL
table this month as it had additional fields added to it which wouldn't appear in the Linked table until
I refreshed the link. There is no Primary Key in the SQL table but as far as I know there never was (it
is managed by another team).
Any ideas why this query is giving this error?
Last edited: