473,498 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

operation must use an updatable query

51 New Member
Can someone help me with this query, which gives the error message "operation must use an updatable query"? Thanks a lot.
Expand|Select|Wrap|Line Numbers
  1. UPDATE publications set publications.pmcid = (select fname.pmcid from fname where fname.pmid=publications.pubmedid)
this following query works fine:
Expand|Select|Wrap|Line Numbers
  1. UPDATE publications inner join fname on fname.pmid=publications.pubmedid
  2. set publications.pmcid = fname.pmcid
Sep 5 '08 #1
10 4089
NeoPa
32,556 Recognized Expert Moderator MVP
Annie, I see you are a fan of subqueries.

I think you may have stumbled upon this problem before though. Have another look through one of your earlier threads for more info on this (Does Subquery nested in Update query work?).

PS. Please remember to use the [ CODE ] tags when posting code. It saves us the trouble of having to add them for you.
Sep 6 '08 #2
anniebai
51 New Member
Annie, I see you are a fan of subqueries.

I think you may have stumbled upon this problem before though. Have another look through one of your earlier threads for more info on this (Does Subquery nested in Update query work?).

PS. Please remember to use the [ CODE ] tags when posting code. It saves us the trouble of having to add them for you.
hmm. I thought I had the same problem before. thanks for reminding me :-)
I know I can work around to achieve the same goal, but I really want to figure out whether this is because Access doesn't support this query or the query itself has a problem. The error message Access gives is misleading.
Sep 9 '08 #3
NeoPa
32,556 Recognized Expert Moderator MVP
hmm. I thought I had the same problem before. thanks for reminding me :-)
I know I can work around to achieve the same goal, but I really want to figure out whether this is because Access doesn't support this query or the query itself has a problem. The error message Access gives is misleading.
I'm not sure why you would consider this error message misleading. It seems to me to be wholly appropriate.

A more detailed and full answer to your question though, can be found by following the link Stewart provided in post #2 of the linked thread.
Sep 10 '08 #4
anniebai
51 New Member
Maybe i missed something, but I've read the troubleshoot page, as far as I understand, none of the items listed answers my question.
Sep 10 '08 #5
NeoPa
32,556 Recognized Expert Moderator MVP
Let me have a dig and see if I can find a clear explanation for you Annie...
Sep 10 '08 #6
NeoPa
32,556 Recognized Expert Moderator MVP
I must admit that, from my recollection, I thought there was a section indicating that subqueries couldn't be used within an updatable query.

This seems not to be the case, so apologies for assuming that answered your question.

It is of course, still possible for there to be such a limitation, which is simply not documented in the article :(

Later I will look at setting up a quick test-rig and seeing if I can show that to be the case, as well as finding some alternative SQL for you to use in this case if I can.
Sep 10 '08 #7
anniebai
51 New Member
Thank you NeoPa.
I am sure the alternative SQL will be useful for people like me, I look forward to seeing them.
Sep 10 '08 #8
NeoPa
32,556 Recognized Expert Moderator MVP
I'm not sure how interesting this will prove Annie. I find that the alternative SQL I would use is in fact the same (laid out differently) as the second set from your first post.
Expand|Select|Wrap|Line Numbers
  1. UPDATE [Publications]
  2. SET [PMCID]=(SELECT [PMCID]
  3.              FROM [FName]
  4.              WHERE FName.PMID=Publications.PubMedID)
Expand|Select|Wrap|Line Numbers
  1. UPDATE [Publications] INNER JOIN [FName]
  2.     ON FName.PMID=Publications.PubMedID
  3. SET Publications.PMCID=FName.PMCID
Sep 10 '08 #9
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Anniebai, Access simply cannot do this kind of update using a subquery in the way listed. Regardless of the reason why, it cannot do it (I have checked for myself to make sure, using a number of different subqueries with no success).

The alternative SQL using a very straightforward inner join works perfectly, which is what you mentioned in post 1 (and this in turn followed on from the SQL NeoPa had provided in the final post of the previous thread).

I'm not sure that there is more we can do here; in posting the link to the Microsoft Knowledgebase article in the previous thread I was trying to advise you that there can be many reasons for queries being non-updatable in Access, not all of them obvious. The article was indicative of the reasons but not exhaustive.

If using standard joins works and subqueries doesn't, then don't use the subquery approach to updates in Access, regardless of the success of such approaches in SQL Server or any other DB.

-Stewart
Sep 10 '08 #10
NeoPa
32,556 Recognized Expert Moderator MVP
I have now set up a rig where I do something very similar to your update. In the standard way it works fine, but it complains about updatable recordsets when I tried with the subquery version.

I think you can take it that this is not supported in Jet SQL, even though the knowledgebase article didn't mention it.
Sep 10 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4498
by: David K | last post by:
Hello, I've been trying to make my db web applications to work in my test server and I keep getting this everytime I try to modidy the database: Microsoft JET Database Engine error '80004005'...
3
12321
by: jallegue | last post by:
I am working with MS-Access 2002. The two tables that I am working with are: dbo_IDX_FRS_account_bal_by_month ==> this is a linked table to SQL == local table The query that is executed is...
1
1294
by: Mr. x | last post by:
Hello, I have hosted my site in an hosting server. I got the following message, while trying inserting a record to the database : Operation must use an updatable query. For what I know, I...
27
18366
by: Bob | last post by:
running access 2k; mdb w/ linked tables to another mdb (front/back-end); trying to run a query that updates a table FROM information from a crosstab query. I AM NOTT trying to update the...
10
3923
by: cyber0ne | last post by:
I'm having a bit of trouble adding records to a local .DB file (using a Paradox connection string). I checked the file permissions, and for testing purposes set Everyone to Full access. But it...
2
1228
by: Enrique Rojas | last post by:
Hello I have this sql that triggers the abovementioned error. UPDATE ra SET ra.Year_1_Cost = (SELECT sum(conversion*Year_1_accom) AS year1 FROM accomfundlevels WHERE driver_id=168 And...
2
1752
Ranjan kumar Barik
by: Ranjan kumar Barik | last post by:
Hello everybody ! I am trying to insert into an access table using ADO in ASP. But i am getting the error message: "Operation must use an updatable query". I have checked the security settings...
8
4414
geolemon
by: geolemon | last post by:
I'm trying to perform an update, and I can't avoid this error - I've tried this query what must be 5 different very fundamentally different ways now. Arg. I used to be a DBA in large DB2 and SQL...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.