Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> update failing for no apparent reason?

update failing for no apparent reason?

From: Robert William Vesterman <bob.work_at_vesterman.com>
Date: Tue, 29 May 2001 14:49:07 -0400
Message-ID: <9qq7hto3vnj1kknbsrqlhbgt179sab2ltg@4ax.com>

Can anyone explain the following behaviour?

SQL> update office_table set ot_state = 13 where ot_mtp_id = 369 and ot_state = 2;
update office_table set ot_state = 13 where ot_mtp_id = 369 and ot_state = 2

*

ERROR at line 1:
ORA-01403: no data found

SQL> select count(*) from office_table where ot_mtp_id = 369 and ot_state = 2;

  COUNT(*)


         1

SQL> update office_table set ot_office = 'TEST' where ot_mtp_id = 369 and ot_state = 2;

1 row updated.

SQL> rollback;

Rollback complete.

SQL> select ot_office_id from office_table where ot_mtp_id = 369 and ot_state = 2;

OT_OFFICE_ID


         748

SQL> update office_table set ot_state = 13 where ot_office_id = 748; update office_table set ot_state = 13 where ot_office_id = 748

*

ERROR at line 1:
ORA-01403: no data found

SQL> select count(*) from office_table where ot_office_id = 748;

  COUNT(*)


         1

SQL> update office_table set ot_state = 13 where ot_office_id in ( select ot_office_id from office_table where ot_mtp_id = 369 and ot_state = 2 );
update office_table set ot_state = 13 where ot_office_id in ( select ot_office_id from office_table where ot_mtp_id = 369 and ot_state = 2 )

*

ERROR at line 1:
ORA-01403: no data found

I am at a loss here. It seems like I can update the row as long as I don't try to update the ot_state column; if I try that, it tells me that there's no such row. That's regardless of whether I also refer to ot_state in the where clause (although I don't think that should matter anyway). Anybody have any idea what could be wrong?

This is with Oracle 8i on an HP-UX machine.

Bob Vesterman. Received on Tue May 29 2001 - 13:49:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US