Home » RDBMS Server » Server Administration » PL/SQL: numeric or value error:
PL/SQL: numeric or value error: [message #52210] Tue, 09 July 2002 05:24 Go to next message
kshathrya
Messages: 29
Registered: October 2001
Junior Member
very urgent, please help.

i am getting this error and ihave tried to rmove the spaces in the data and stuff. it din work. is there ary proceudre i can use to remove all spaces or junk values like # or % and stufff..

error:
Error -6502: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06502: PL/SQL: numeric or value error: character to number conversion error

one piece of code, where the error is coming, i guess:

IF TRUNC (
TO_NUMBER (
LTRIM (RTRIM (diag_rec.sec_diag6)))) = TRUNC (TO_NUMBER (v_icd_main))
THEN
v_icd := v_icd+ 1;
END IF;

datatypes associated with that:
v_icd_main VARCHAR2 (50)
v_icd VARCHAR2 (50)
v_icd250 VARCHAR2 (50) := 0;

it works for a small dataset with data. when i try a huge datasset somewhere its geting messed up. i am asuming its some space in some blank fields.
how do i remove spaces inside data columns.
Re: PL/SQL: numeric or value error: [message #52219 is a reply to message #52210] Tue, 09 July 2002 09:34 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
to remove the blankspaces you can use REPLACE. something like
  1*  select '   there           are     many spaces' a,replace('there are many spaces',' ') b from dual
SQL> /

A                                      B
-------------------------------------- ------------------
   there           are     many spaces therearemanyspaces
Previous Topic: OMS
Next Topic: Re: ORA-01092: Oracle instance terminated. Disconnection forced. error
Goto Forum:
  


Current Time: Wed Dec 25 21:13:15 CST 2024