Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7923987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:30:41+00:00 2026-06-03T17:30:41+00:00

I was looking through the AskTom site and found what should be a very

  • 0

I was looking through the AskTom site and found what should be a very powerful tool for update statments but my statement refuses to accept the alias after the subquery.
Can someone please explain this for me and possibly show a solution?

Update (SELECT T.Date_,T.Name_ 
        FROM TableA T, TableB P
        WHERE P.Date_ = T.Date_
        AND   P.Name_ = T.Name_) SET P.ID = T.Name_

There may be other issues as to how to run this type of update and That would be a bonus. I am more interested at this point in trying to understand the alias problem. I have tried to sub in

TableB.ID = TableA.Name_ 

but no luck

Specifically the error is ORA-00904 invalid identifier.

As always thanks in advance.

The above issue has been answered for me but I do have some others as I try to understand it.

I now get ORA-01779 cannot modify a column which maps to a non-key preserved table.
I presume this is referring to the table I’m trying to update correct? As I could update from a view or any other proper source that may not have a pk or fk.

Can this type of update statement work with Oracle temp tables or can I expect problems?

Can I use this type of statement with a case statement to update multiple columns in TableA or will there be problems?

Thanks again.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:30:43+00:00Added an answer on June 3, 2026 at 5:30 pm

    When you perform an UPDATE (query) operation, the only columns you can use outside the parentheses are the names of columns returned by the query – in this case Date_ and Name_. The table aliases you used in the query are not valid outside the parentheses either.

    What you therefore need is:

    Update (SELECT P.ID ,T.Name_ 
            FROM TableA T, TableB P
            WHERE P.Date_ = T.Date_
            AND   P.Name_ = T.Name_) SET ID = Name_
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking through style sheets from popular & unpopular websites I have found the div
Looking through the Mozilla JavaScript site, I see that JavaScript 1.8 has a lot
Looking through the dom.js source from the Closure library I found this (in goog.dom.getElementsByTagNameAndClass_
Looking through the source is a nightmare because it's all using complicated arrays, but
Looking through Java EE6 API I've found interesting package javax.xml.registry.infomodel , containing such interfaces
Looking through this C++ BigInt library and found the BigInt.cpp file. At the top
After looking through the questions on this site and doing a few internet searches
Looking through some code I came across the following code trTuDocPackTypdBd.update(TrTuDocPackTypeDto.class.cast(packDto)); and I'd like
After looking through some sites (eg https://www.owasp.org/index.php/Main_Page ) I found no EXPLICIT mention of
Looking through the Android apis I found a method call isUserAMonkey() , says it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.