DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 12

Thread: Update query - ora-01427 error

Threaded View

  1. #1
    Join Date
    Jan 2008
    Posts
    5

    Update query - ora-01427 error

    Hello,
    I'm trying to run an update query, to replace all rows with a null date value, with a date from another table.
    I get an ora-01427 error when I try to run the query.
    I realize that the reason I get this is because there is >1 row being returned - but there are >1 records I need updated.
    I'm thinking I need to use 'IN' instead of '=' but not sure how...
    I've pasted my code below and attached a .pdf explanation (it's quite confusing).
    Thanks in advance!!
    Amber

    UPDATE SILVICULTURE_ACTIVITY
    SET SILA_START_DATE = (SELECT SILVICULTURE_AMENDMENT.SAMM_DIST_APPR_DATE
    FROM
    SILVICULTURE_ACTIVITY,
    SILVICULTURE_COMPANY_ACTIVITY,
    SILVICULTURE_AMENDMENT,
    SILVICULTURE_PRESCRIPTION,
    CUT_BLOCK
    WHERE
    SILVICULTURE_ACTIVITY.SICA_SEQ_NBR = SILVICULTURE_COMPANY_ACTIVITY.SICA_SEQ_NBR AND
    SILVICULTURE_ACTIVITY.CUTB_SEQ_NBR = SILVICULTURE_PRESCRIPTION.CUTB_SEQ_NBR AND
    SILVICULTURE_AMENDMENT.SILP_SEQ_NBR = SILVICULTURE_PRESCRIPTION.SILP_SEQ_NBR AND
    SILVICULTURE_PRESCRIPTION.CUTB_SEQ_NBR = CUT_BLOCK.CUTB_SEQ_NBR AND
    SICA_ACTIVITY_NAME = 'SP' AND
    SILVICULTURE_AMENDMENT.SAMM_DIST_APPR_DATE IS NOT NULL)
    WHERE
    SILA_STATUS = 'P' AND SILA_START_DATE IS NULL AND
    /
    Attached Files Attached Files

Posting Permissions

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


Click Here to Expand Forum to Full Width