Results 1 to 8 of 8
  1. #1
    jker is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Aug 2023
    Posts
    36

    NEED HELP WITH 'operation must use updateable query'

    I have 2 tables. I want to update the EXPLODE_CUST_NAME with the contents of CUST_FNAME from CUSTOMER table.


    the EXPLODE_CUSTOMER_ID value is used to match/select the corresponding CUST_ID and pull out the CUST_FNAME contents

    BUT I KEEP GETTING that error WHEN I RUN MY QUERY .

    here is my query sql :

    UPDATE SALES_HISTORY_EXPLODED AS X
    SET X.EXPLODE_CUST_NAME = (SELECT C.CUST_FNAME FROM CUSTOMER AS C
    WHERE X.EXPLODE_CUSTOMER_ID = C.CUST_ID)
    Click image for larger version. 

Name:	CUSTOMER.JPG 
Views:	21 
Size:	53.5 KB 
ID:	50936Click image for larger version. 

Name:	EXPLODE.JPG 
Views:	22 
Size:	38.2 KB 
ID:	50937Click image for larger version. 

Name:	ERROR.JPG 
Views:	21 
Size:	23.6 KB 
ID:	50938

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why are you saving customer name in exploded table when the name can be retrieved by joining tables? At least, you could join if the CUSTOMER_ID foreign key was a long integer number type field.

    Should explode_ID be an autonumber type?

    Duplicating data between multiple tables is usually bad design.

    Why is your query not updatable? Review sixth item in http://allenbrowne.com/ser-61.html#:...FORM%20clause.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jker is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Aug 2023
    Posts
    36
    THANK YOU FOR YOU ADVICE, BUT THESE ARE THE BURDENS WHEN YOU INHERIT A SYSTEM AND NEED TO MAKE 'minor' modifications as per user request.

    neither table has primary keys by design.... I looked at teh document you sent and none of them apply.. is there anyother way to to this 'simple' task?

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    For your information, using all caps in a sentence is considered to be shouting and rude.
    It is, as pointed out to you, caused by item #6.
    If the text id's happen to be the auto id numbers then I'd consider changing the data type to long and just joining the tables. Otherwise I'd fix the table design because it's incorrect. There is no way you're going to update any table when the query contains a subquery.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    neither table has primary keys by design....
    So what do you think the key symbol means?
    Click image for larger version. 

Name:	image_2023-10-25_154717754.png 
Views:	16 
Size:	7.5 KB 
ID:	50939

    And why do you think you can match a number field to a text field?
    Click image for larger version. 

Name:	image_2023-10-25_155042768.png 
Views:	15 
Size:	12.6 KB 
ID:	50941

    Click image for larger version. 

Name:	image_2023-10-25_154918141.png 
Views:	15 
Size:	7.6 KB 
ID:	50940

    EXPLODE_CUSTOMER_ID = C.CUST_ID


  6. #6
    jker is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Aug 2023
    Posts
    36
    Relax....... i have a broken hand in a cast... Caps werent intentional...... here is a lolly pop if you felt slighted

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Relax yourself. People here are experienced volunteers. We see all sorts of questions and comments. Most, if not all of us, have had to take over an application without documentation, without a sponsor and have been "thrown into a situation(s)" as you have.

    We see poor designs quite often. Comments on poor design are not a reflection of the poster necessarily- your case is an example. Comments are meant as facts or norms (constructive criticism). Poor design can often be identified and corrected, and that is what the advice given by the others intended.

    If your CaPs were not intentional, then you have excellent coordination (or an AI driven contextual keyboard) providing the appropriate mechanics of writing displayed in the upper and lower case in your post #1.

    There is no need to be snarky. We're trying to be helpful.

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Some people are not cognizant of proper forum decorum. Some are just rude. You are at least the latter if not both. Don't worry, you can have the last word on this. I won't see it because I'm unsubscribing from this thread and putting you on my ignore list.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. operation must use updateable query ?
    By stalk in forum Queries
    Replies: 2
    Last Post: 04-20-2020, 02:04 PM
  2. Operation must use an updateable query - help
    By fluffyvampirekitten in forum Access
    Replies: 5
    Last Post: 01-08-2016, 08:11 AM
  3. Replies: 3
    Last Post: 11-26-2013, 01:45 PM
  4. Operation must be an updateable query! Arg
    By redbull in forum Queries
    Replies: 6
    Last Post: 10-05-2012, 02:04 PM
  5. Operation must use an updateable query
    By skaswani in forum Queries
    Replies: 0
    Last Post: 12-23-2010, 11:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums