string concatenation
808570Oct 28 2010 — edited Oct 29 2010how to concatenate two strings in plsql
i have varchar2 column in my table
in my plsql code i want all values in that column into one variable when loop runs..
i use cursors
declare
i varchar2(4000):='0';
cursor c1
is
(select * from gl_je_lines
where period_name='Mar-10'
and reference_10='WRITEOFF');
begin
for cur_record in c1
loop
i:=cur_record.reference_2 + ',' + i;
dbms_output.put_line(i);
end loop;
end;
/
i got error like
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 11
please tell me what is the problem in this code