Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Unanswered: Link two tables in UPDATE - ERR:single-row subquery returns more than one row

    1 UPDATE PM_ASSIGNMENTS
    2 SET PM_ASSIGNMENTS.JOB_TYPE_CODE = (SELECT PM_TASK_DETAILS.JOB_TYPE_CODE
    3 FROM PM_ASSIGNMENTS, PM_TASK_DETAILS
    4 WHERE ((PM_ASSIGNMENTS.TASK_NUMBER) = (PM_TASK_DETAILS.TASK_NUMBER))
    5* AND (PM_ASSIGNMENTS.TASK_NUMBER = '1000'))
    SQL> /
    SET PM_ASSIGNMENTS.JOB_TYPE_CODE = (SELECT PM_TASK_DETAILS.JOB_TYPE_CODE
    *
    ERROR at line 2:
    ORA-01427: single-row subquery returns more than one row

  2. #2
    Join Date
    May 2003
    Posts
    12
    the sub-query is returning more than one row for the given condition.

    either group-by them, or give all user-key conditions.

    regards,
    Raghu.

Posting Permissions

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