Cursor LOOP and Clob reinitializing
Date: 2000/05/16
Message-ID: <8fs6gu$1moj$1_at_news4.isdnet.net>#1/1
[Quoted] 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
[Quoted] I've got a cursor CCOM (for MXF):
flagfirst:='O';
[Quoted] 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';
END IF; IF idT != rec.id THEN
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; [Quoted] [Quoted] 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
[Quoted] 2 yada yidi go gee cool big
[Quoted] How can I reinitialize the clob_tempo when the id change ? (i've made some
tries but without any result )
[Quoted] [Quoted] Or is there another method to solve this problem ?
Thank you for any help Received on Tue May 16 2000 - 00:00:00 CEST