From time to time I will be faced the problem to move data from one table to another. Under normal circumstances this is not a big deal, but if the source table contains a long-/raw column this is impossible to manage that with plain SQL. So here is a suitable workaround to solve this problem with a few lines of PL/SQL code
Starting point is a table with a long raw column:
3 | long_column /* LONG-Feld */ |
5 | where a.long_id = 'some old id' ; |
This ends up with "ORA-00997: illegal use of LONG datatype error"
The workaround is:
02 | l_rec_long_table long_table%rowtype; |
07 | where a.long_id = 'some old id' ; |
09 | insert into long_table |
12 | l_rec_long_table.long_column); |