Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Posts
    227

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

    hi,
    I've 2 tables
    TABLE RE with these col
    RE_ID varchar2(32) primary key
    PROPERTY char(1)

    TABLE RE_NEW with these col
    A_RE_ID varchar2(2)
    B_RE_ID varchar2(6)
    PROPERTY char(1)


    A_RE_ID + B_RE_ID = RE_ID

    The col PROPERTY of RE_NEW is full and PROPERTY of RE is empty.
    I'd like to populate PROPERTY of RE with same values of RE_NEW.

    my query is

    UPDATE RE
    SET PROPERTY = (SELECT PROPERTY
    FROM RE_NEW
    WHERE A_RE_ID=SUBSTR(RE.RE_ID,1,2)
    AND B_RE_ID=SUBSTR(RE.RE_ID,3,6))

    where I run this query I get this error:

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

    What I wrong??

    Thanks
    Raf

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

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

    It means that for some value of RE_ID there are 2 or more rows in RE_NEW that match the WHERE clause, so Oracle doesn't know which one you want to get the PROPERTY value from.

Posting Permissions

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