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

    Unanswered: error on update table

    Hi,
    I tried these statements:

    select rm_type, sum(area)
    from rm
    where rm_type='INCLUDE ALL'
    AND AREA > 30

    RM_TYPE.........SUM(AREA)
    INCLUDE ALL.......27000

    but when I update:

    UPDATE RM
    SET RM_TYPE='INCLUDE NOT ALL'
    WHERE RM_TYPE='INCLUDE ALL'
    AND AREA > 30

    I get this error:
    ORA-01403 No Data Found

    How can I update my rows??

    Thanks!!

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You would never get a "no data found" error from an UPDATE statement - that just doesn't happen:
    Code:
    SQL> update emp set ename='XX'
      2  where ename = 'NOBODY CALLED THIS'
      3  /
    
    0 rows updated.
    Please post the full code and error message.

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Try the following and see what it says

    select count(*)
    from rm
    where rm_type='INCLUDE ALL'
    AND AREA > 30;

    This will give you the number of records that match your criterea. Also the error "ORA-01403 No Data Found" can only be generated by a select.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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