Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-06502: PL/SQL Error: numeric or value error
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 DBAReceived on Wed May 30 2007 - 05:29:16 CDT
![]() |
![]() |