FOR this_loop
IN (SELECT field_A, field_B
FROM TABLE_NAME
WHERE num = i_num)
LOOP
IF this_loop.field_B BETWEEN 1 AND 3
THEN
v_A := v_A || ' ' || this_loop.field_A;
ELSIF this_loop.field_B BETWEEN 4 AND 8
THEN
v_field_A := v_field_A || ' ' || this_loop.field_A; -- Error is at this line
ELSIF this_loop.field_B BETWEEN 9 AND 15
THEN
v_B := v_B || ' ' || this_loop.field_A;
END IF;
END LOOP;
Variable decalared as
v_field_A VARCHAR2 (100);
What I know -
- Variable v_field_A cannot hold value more than 100 characters
- The output I get from the
SELECTQuery doesn't have more than 10 characters.
My question - How is even possible to face this issue of space buffer when the characters are whitin the limit of varchar2 ?
I have faced this issue few years back but last time the cause was output of select query. It had more than 100 characters and hence the size issue but this time it is not more than 10 characters. I'm confused. Any help is appreciated