Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Cursor LOOP and Clob reinitializing
I've got 2 tables: MRF (id,clob_textR) and MXF(id,id2,clob_textX) Given 1 id in the MRF table, i want to append all the clob_text of MXF to the one in MRF:
Example:
MRF
1 yada
2 gee
MXF
1 1 yidi
1 2 go
2 1 cool
2 2 big
=>PROCESS=>
MRF
1 yada yidi go
2 gee cool big
I've got a cursor CCOM (for MXF):
flagfirst:='O';
FOR rec IN CCOMM LOOP
IF flagfirst = 'O' THEN
idT := rec.id; SELECT Clob_TextT INTO clob_tempo FROM MRF WHERE id=rec.id FOR UPDATE; flagfirst := 'N';
UPDATE MRF SET Clob_TextT = clob_tempo WHERE id = rec.id ; NumT := rec.NumLieu; SELECT Clob_TextT INTO clob_tempo FROM MRF WHERE id=rec.id FOR UPDATE;END IF; dbms_lob.append(clob_tempo, rec.Clob_textX);
END LOOP;
The problem is that the process keep appending data from the beginning:
=> MRF
1 yada yidi go
2 yada yidi go gee cool big
How can I reinitialize the clob_tempo when the id change ? (i've made some
tries but without any result )
Or is there another method to solve this problem ?
Thank you for any help Received on Tue May 16 2000 - 00:00:00 CDT
![]() |
![]() |