See below:
create table gg (xx long raw);
create table gg (x1 varchar2(4000), x2 varchar2(4000), x3 varchar2(4000), x4 varchar2(4000));
insert into gg select rpad('a', 4000, 'a'), rpad('b', 4000, 'b'), rpad('c', 4000, 'c'), rpad('D', 4000, 'D');
insert into g select x1 || x2 || x3 || x4 from gg;
*
ERROR at line 1:
ORA-01489: result of string concatenation is too long
SQL> select x1 || x2 from gg;
select x1 || x2 from gg
*
ERROR at line 1:
ORA-01489: result of string concatenation is too long
insert into g
select UTL_RAW.CAST_TO_RAW(x1 || x2) from GG
ERROR at line 1:
ORA-01489: result of string concatenation is too long
Up to now I've always made the programmers write info to these data types. I'm trying to write up to four 4000 character varchar values to a Long Raw. Am I doing something wrong or can this not be done the way I think it can?