update table set column and select from another table to udpate multiple columns

Posted on 2009-12-16
Last Modified: 2013-12-18
I have a update statement
update test
set (col1, col2) = (
                                  select (col1,col2) from tableA

did not work - Ora - 0907 - missing right parentheseis
Question by:mahjag
    LVL 9

    Accepted Solution

    try this:
    update test
    set (col1, col2) = (select col1,col2
                                  from tableA);

    Author Comment

    The above query to update is not working and I am getting "single row subquery returns more than a row" error in production , I saw that it was kind of working in dev but I am now in prod and it does not - can in anyway you can help me -

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Suggested Solutions

    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
    This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
    This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now