Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> problem: PLSQL and LONG RAW datatypes
Hi!
I have a problem with copying a row of a table with LONG or LONG RAW data.
I'm using oracle 7.3.4.
I normally use the following insert statement to duplicate a row on tables
without LONG or LONG RAW data in it:
insert into TABLE (id, siteid,...,...) select id, (X+1), ...,.... from TABLE where siteid=X;
where X is the actual SITEID and (X+1) is the next valid SITEID (got by a
sequence). X is a constant number.
This works fine but not on tables within blob data types. That was why I
tried out a pl/sql procedure with a cursor running through the tables:
procedure stage_bindaten( old_siteid in number, new_siteid in number, result
out number )
IS
CURSOR stage_cur( sid NUMBER ) IS
SELECT * FROM bindaten WHERE siteid=sid ORDER BY id;
begin
result := 0;
FOR stage_rec IN stage_cur( old_siteid )
LOOP
INSERT INTO bindaten
(
ID,
NAME,
BINDATENKLASSEID,
DATEN,
PFAD,
REPOSITORYID,
SITEID
)
VALUES
(
stage_rec.ID, stage_rec.NAME, stage_rec.BINDATENKLASSEID, stage_rec.DATEN, stage_rec.PFAD, stage_rec.REPOSITORYID,
All what it should do is to duplicate a row. This procedure will do his work fine but pl/sql seems to cut data from the LONG RAW column (daten) after a specified length. So only parts of the blobs have been duplicated...?!
Who knows what I can do to transfer/duplicate a row with LONG and/or LONG RAW data????
Bye,
Holger Kramer
Received on Fri Nov 19 1999 - 05:18:15 CST
![]() |
![]() |