Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: pl help me in oracle
"saravanan" <saravanan120480_at_gmail.com> schreef in bericht
news:1159429497.091295.160270_at_i42g2000cwa.googlegroups.com...
> hi,
> ls_line1 :=SUBSTR(trim(ls_line1),6,LENGTH(ls_line1));
> // this variable contains the value '126/1'
> ls_statement_no := SUBSTR(ls_line1, 1,INSTR(ls_line1,'/',1)- 1 ) ;
> // this variable contains the value '126'
> li_statement_no:=to_number(ls_statement_no);
>
> // it is working fine
>
> ls_page_no := SUBSTR(trim(ls_line1),
> INSTR(ls_line1,'/',1)+1,LENGTH(ls_line1));
> // this variable contains the value '1'
> li_page_no:=to_number(ls_page_no)
> when we convert the string to number , i got an error. the error is
> 06502- character to number conversion error
> even if i did the implicit conversion, it is throwing an error
>
Sorry, I misread your code. IF ls_line is 126/1 after your first line of code, it works in my testcase. So test if the first line of code gives the correct result.
Robbert Received on Thu Sep 28 2006 - 05:11:30 CDT
![]() |
![]() |