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 -> ORA-06502 when using to_char function

ORA-06502 when using to_char function

From: <mfugazi_at_my-deja.com>
Date: 2000/07/17
Message-ID: <8kvpma$cet$1@nnrp2.deja.com>#1/1

I have a stored procedure in Oracle with a varchar2 out parameter.

CREATE OR REPLACE procedure
a_proc ( a_string out varchar2 )

In the body of the stored proc I've declared a variable v_num number(9,3) which is initialized by a select statement

select some_col into v_num from some_table;

Now, I want to convert v_num into a string and assigned it to the out parameter.

select to_char(v_num,') into a_string from dual;

The stored proc is valid when I compile it, but I get this error when I run it:

ORA-06502, "PL/SQL: numeric or value error"

Can someone tell me what I'm doing wrong ?

Thanks.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Jul 17 2000 - 00:00:00 CDT

Original text of this message

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