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

Re: ORA-06502 when using to_char function

From: Matt Parker <mparker_at_computer.org>
Date: 2000/07/17
Message-ID: <AOPc5.720$Qd4.259478@news.uswest.net>#1/1

what does your format model look like?

<mfugazi_at_my-deja.com> wrote in message news:8kvpma$cet$1_at_nnrp2.deja.com...
> 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