Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-06502: PL/SQL Error: numeric or value error

Re: ORA-06502: PL/SQL Error: numeric or value error

From: sybrandb <sybrandb_at_gmail.com>
Date: 30 May 2007 03:29:16 -0700
Message-ID: <1180520956.635136.236830@q75g2000hsh.googlegroups.com>


On May 30, 11:53 am, nodge <nodge.trott..._at_googlemail.com> wrote:
> I've got an PL/SQL Error:
>
> SQL> declare
> 2 v_tmp char(15);
> 3 BEGIN
> 4 v_tmp := '';
> 5 v_tmp := v_tmp || 'thw';
> 6 insert into thwtab values (42, v_tmp);
> 7 commit;
> 8 end;
> 9 /
> declare
> *
> ERROR at line 1:
> ORA-06502: PL/SQL: numeric or value error
> ORA-06512: at line 5
>
> Any Suggestions? Whats wrong?
>
> thx!
> nodge

v_tmp is a char(15), which means fixed length, automagically padded upon assignment.
After line 4 you have a variable with 15 spaces, and you obviously can't execute line 5.
Either change char in varchar2 or remove line 4.

--
Sybrand Bakker
Senior Oracle DBA
Received on Wed May 30 2007 - 05:29:16 CDT

Original text of this message

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