Home » SQL & PL/SQL » SQL & PL/SQL » error during inserting(ORA-01403: no data found)
error during inserting(ORA-01403: no data found) [message #282144] |
Wed, 21 November 2007 00:15  |
jitender.sadh
Messages: 86 Registered: May 2007
|
Member |
|
|
hi
i m inserting a row in a table,the description of table is
SQL> desc fac_vch_m
Name Null? Type
----------------------- ---------------------
VCH_LOCN_CODE VARCHAR2(6)
VCH_VCH_TYPE VARCHAR2(6)
VCH_VCH_# VARCHAR2(18)
VCH_VCH_DATE NOT NULL DATE
VCH_ATHR_BY VARCHAR2(6)
VCH_ENTR_BY VARCHAR2(6)
VCH_ENTR_DATE DATE
DB_AMT NUMBER(16,2)
CR_AMT NUMBER(16,2)
NET_AMT NUMBER(16,2)
NET_AMT_SIGN VARCHAR2(6)
VCH_ATHR_FLAG VARCHAR2(1)
VCH_RJTD_FLAG VARCHAR2(1)
VCH_RJTD_BY VARCHAR2(6)
VCH_BANK_CODE VARCHAR2(6)
and the query which i m using for insertion is
SQL> ;
1 INSERT INTO FAC_VCH_M(VCH_LOCN_CODE,VCH_VCH_#
2 ,VCH_VCH_TyPe,VCH_VCH_DATE, DB_AMT,
3 CR_AMT,VCH_ENTR_BY,VCH_ENTR_DATE)
4 VALUES
5 ('400001','0700012','0110',SYSDATE,1,1,
6* 'A', SYSDATE)
SQL> /
INSERT INTO FAC_VCH_M(VCH_LOCN_CODE,VCH_VCH_#
*
ERROR at line 1:
ORA-01403: no data found
regards
jitender
[Updated on: Wed, 21 November 2007 00:25] Report message to a moderator
|
|
|
|
|
Re: error during inserting(ORA-01403: no data found) [message #282168 is a reply to message #282150] |
Wed, 21 November 2007 01:11   |
jitender.sadh
Messages: 86 Registered: May 2007
|
Member |
|
|
THX FOR REPLY
actually there is no trigger on that table ,the probleum is that when i run that statement on dummy user on different database which have same structure as original one it run sucessfully.
SQL> conn nds/nds@ora
Connected.
SQL> INSERT INTO FAC_VCH_M(VCH_LOCN_CODE,VCH_VCH_#, VCH_VCH_TyPe,VCH_VCH_DATE, DB_AMT,
2 CR_AMT, VCH_ENTR_BY, VCH_ENTR_DATE)
3 VALUES( '400001','0700012', '0110', SYSDATE, 1, 1,
4 'A', SYSDATE) ;
1 row created.
but it give error on original user
SQL> conn newton/newton@oracle
Connected.
SQL> INSERT INTO FAC_VCH_M(VCH_LOCN_CODE,VCH_VCH_#, VCH_VCH_TyPe,VCH_VCH_DATE, DB_AMT,
2 CR_AMT, VCH_ENTR_BY, VCH_ENTR_DATE)
3 VALUES( '400001','0700012', '0110', SYSDATE,1,1,
4 'A', SYSDATE) ;
INSERT INTO FAC_VCH_M(VCH_LOCN_CODE,VCH_VCH_#, VCH_VCH_TyPe,VCH_VCH_DATE, DB_AMT,
*
ERROR at line 1:
ORA-01403: no data found
i m also surprised why this is happness
regards
jitender
|
|
|
|
|
|
|
|
|
|
Re: error during inserting(ORA-01403: no data found) [message #282246 is a reply to message #282144] |
Wed, 21 November 2007 04:23  |
 |
rajavu1
Messages: 1574 Registered: May 2005 Location: Bangalore , India
|
Senior Member |

|
|
No Kiran ,
It is happen when Select tries to access column not having data . No data doesn't mean thata value is NULL .
SQL> create table t1 (val varchar2(10));
Table created.
SQL> create table t2 (val varchar2(10));
Table created.
SQL> create trigger trg after insert on t1 for each row
2 declare
3 v varchar2(10);
4 begin
5 select val into v from t2;
6 end;
7 /
Trigger created.
SQL> insert into t1 values ('x');
insert into t1 values ('x')
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "MTN4C_TRG.TRG", line 4
ORA-04088: error during execution of trigger 'MTN4C_TRG.TRG'
SQL> insert into t2 values(NULL) ;
1 row created.
SQL> insert into t1 values ('x');
1 row created.
SQL>

Rajuvan
[Updated on: Wed, 21 November 2007 04:25] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Aug 28 15:27:56 CDT 2025
|