Home » RDBMS Server » Server Administration » string "overflow" by concatenating strings
string "overflow" by concatenating strings [message #371908] Tue, 19 December 2000 04:41 Go to next message
lhj
Messages: 5
Registered: November 2000
Junior Member
SQLWKS> DECLARE
4> CURSOR C1 IS select distinct fravare
5> from skiftekart
6> where kundekonkurrent = ' CARGO' AND
7> active = 1 AND
8> tilskiftetype = 1 AND
9> fraskiftetype = 3 ;
10>
11>
12> CURSOR TAB2(NUM varchar2) IS
13> SELECT TILVARE FROM skiftekart
14> where kundekonkurrent = ' CARGO' AND
15> active = 1 AND
16> tilskiftetype = 1 AND
17> fraskiftetype = 3 AND
18> fravare = num;
19>
20> replacingliste varchar2(1980);
21>
22> BEGIN
23>
24> FOR i IN C1 LOOP
25> replacingliste := '';
26> FOR j IN tab2(i.fravare) LOOP
27> replacingliste:= replacingliste || j.tilvare || ',';
28> END LOOP;
29>
30> replacingliste := SUBSTR(replacingliste,1,length(replacingliste) -1);
31> insert into p1_boschreplacing values(i.fravare, replacingliste);
32>
33> END LOOP;
34> commit;
35> END;
36> /
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 31

How can I avoid this error?

BEST Regards
LHJ
Re: string "overflow" by concatenating strings [message #371931 is a reply to message #371908] Fri, 22 December 2000 02:28 Go to previous message
SQL_Tuner
Messages: 8
Registered: November 2000
Junior Member
There's not enough info to say for sure. We need a description of p1_boschreplacing and skiftekart, at minimum. In general, this sort of error when means there is a type mismatch. If you try to store the letter 'A' into a numeric field, that would probably cause this sort of error, for example.

Regards,
ST
Previous Topic: Re: How do I know from unix prompt Oracle instance status
Next Topic: Performance Issue
Goto Forum:
  


Current Time: Thu May 16 23:41:40 CDT 2024