Home » SQL & PL/SQL » SQL & PL/SQL » how to use substr if the error ORA-01403: no data found.
how to use substr if the error ORA-01403: no data found. [message #611157] Fri, 28 March 2014 08:47 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

Suppose my v_headers.bill getting more than 5 characters i am getting ORA-01403: no data found.

For this i have increased the size as VARCHAR2(20), it is working dine.

But i want to use substr in the below code , where , why and how can i use? Please explain me.

DECLARE 
    v_item_number VARCHAR2(5); 
BEGIN 
    IF v_headers.prime_number = '12345678' THEN 
      v_item_number := v_headers.bill; 
    ELSE 
      v_item_number := NULL; 
    END IF; 
END; 
Re: how to use substr if the error ORA-01403: no data found. [message #611160 is a reply to message #611157] Fri, 28 March 2014 08:53 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
mist598 wrote on Fri, 28 March 2014 06:47
Hi all,

Suppose my v_headers.bill getting more than 5 characters i am getting ORA-01403: no data found.

For this i have increased the size as VARCHAR2(20), it is working dine.

But i want to use substr in the below code , where , why and how can i use? Please explain me.

DECLARE 
    v_item_number VARCHAR2(5); 
BEGIN 
    IF v_headers.prime_number = '12345678' THEN 
      v_item_number := v_headers.bill; 
    ELSE 
      v_item_number := NULL; 
    END IF; 
END; 


how utterly lame, lazy, & disrespectful is the post above after more than 1 year posting here about twice a day and still no Oracle version included with this thread.

01403, 00000, "no data found"
// *Cause: No data was found from the objects.
// *Action: There was no data from the objects which may be due to end of fetch.
[oracle@localhost ~]$

ORA-01403 results from a FETCH from cursor, but no cursor exists in posted code.
Please maintain at least 2 meter separation from any keyboard which will benefit everyone here.
Re: how to use substr if the error ORA-01403: no data found. [message #611162 is a reply to message #611160] Fri, 28 March 2014 08:59 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:

how utterly lame, lazy, & disrespectful is the post above after more than 1 year posting here about twice a day and still no Oracle version included with this thread.

01403, 00000, "no data found"
// *Cause: No data was found from the objects.
// *Action: There was no data from the objects which may be due to end of fetch.
[oracle@localhost ~]$

ORA-01403 results from a FETCH from cursor, but no cursor exists in posted code.
Please maintain at least 2 meter separation from any keyboard which will benefit everyone here.


Hi BlackSwan,

Thank you for early reply i am sorry for that.I want to know how to use the substr function in this code to avoid the 01403 error

v_item_number := v_headers.bill;
Re: how to use substr if the error ORA-01403: no data found. [message #611164 is a reply to message #611162] Fri, 28 March 2014 09:07 Go to previous message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
Mist - nothing you've posted will give ORA-01403.
We have no idea where your error is coming from or how substr is relevant to it in any way.

You, as always, need to supply more details.
Previous Topic: Nested Select for summary
Next Topic: Union??? or Merge of tables
Goto Forum:
  


Current Time: Sat May 04 16:07:54 CDT 2024