Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

operation must use an updateable query

Status
Not open for further replies.

longhair

MIS
Feb 7, 2001
889
US
i've run accross this issue in the past but always with much harder queries. trying to update field 5 in table a from field in odbc linked table b.
Code:
UPDATE tbla INNER JOIN [tblb] ON tbla.[field1] = [tblb].[field2] SET tbla.[field5] = [tblb]![field12];
local tables are created on the fly and this has been working for years. only change is using an alter table statement to add a field to tbla to contain this new data.
any thoughts?
regards,
longhair
 

My guess is that [blue]tbla[/blue] is locked by a Form or Query or something..

Make sure it isn't locked by something else while you're trying to run the code.

--

"If to err is human, then I must be some kind of human!" -Me
 
What about this ?
Code:
UPDATE tbla 
SET field5 = (SELECT field12 FROM tblb WHERE field2=tbla.field1)
WHERE field1 IN (SELECT field2 FROM tblb)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
looks like the issue has to be with table b being an odbc linked table. i just grabbed the few fields i needed from it and wrote them to another temp table and will do my update from that one.
thanks.
regards,
longhair
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top