Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004

    Unanswered: Update statement error

    I have an update statement that when I run it, I get the following error message:

    ORA-01427: single-row subquery returns more than one row

    Update statement:

    update inna_set_system
    set (add_name, add_no,address_2, add_city, add_state, add_zip,alpha_udf8) =
    (select add_name, add_no, addr_2,add_city, add_state, add_zip,alpha_udf8
    from load_maint_addr lma
    where inna_set_system.system = lma.system

    I don't know how to get around it. Please help. Thanks.

  2. #2
    Join Date
    Aug 2004
    Your subquery returns several rows when it should only return one. You can't affect the values of several rows to a single row. If the several rows in your subquery have the exact same values for the columns you select, then you can add DISTINCT to your subquery so that it would return one single row, else you would have to add a more restrictive condition in the where clause of this subquery.

    HTH & Regards,


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts