1187: -- into a VARCHAR2, which are easier to manipulate.
1188: -- N.B. CLOBs can hold something like 2Gb, this VARCHAR2 can only hold
1189: -- about 32Kb. Ooer. Shouldn't really be a problem, 32Kb is quite
1190: -- a big bit of PL/SQL, just don't put millions of comments in :-)
1191: Dbms_Lob.Open(p_clob,Dbms_Lob.Lob_Readonly);
1192: l_s := Dbms_Lob.Getlength(p_clob);
1193: Dbms_Lob.Read(p_clob,l_s,1,l_vc2);
1194: Dbms_Lob.Close(p_clob);
1195: --
1188: -- N.B. CLOBs can hold something like 2Gb, this VARCHAR2 can only hold
1189: -- about 32Kb. Ooer. Shouldn't really be a problem, 32Kb is quite
1190: -- a big bit of PL/SQL, just don't put millions of comments in :-)
1191: Dbms_Lob.Open(p_clob,Dbms_Lob.Lob_Readonly);
1192: l_s := Dbms_Lob.Getlength(p_clob);
1193: Dbms_Lob.Read(p_clob,l_s,1,l_vc2);
1194: Dbms_Lob.Close(p_clob);
1195: --
1196: -- Send back the text
1189: -- about 32Kb. Ooer. Shouldn't really be a problem, 32Kb is quite
1190: -- a big bit of PL/SQL, just don't put millions of comments in :-)
1191: Dbms_Lob.Open(p_clob,Dbms_Lob.Lob_Readonly);
1192: l_s := Dbms_Lob.Getlength(p_clob);
1193: Dbms_Lob.Read(p_clob,l_s,1,l_vc2);
1194: Dbms_Lob.Close(p_clob);
1195: --
1196: -- Send back the text
1197: RETURN l_vc2;
1190: -- a big bit of PL/SQL, just don't put millions of comments in :-)
1191: Dbms_Lob.Open(p_clob,Dbms_Lob.Lob_Readonly);
1192: l_s := Dbms_Lob.Getlength(p_clob);
1193: Dbms_Lob.Read(p_clob,l_s,1,l_vc2);
1194: Dbms_Lob.Close(p_clob);
1195: --
1196: -- Send back the text
1197: RETURN l_vc2;
1198: END lob_to_varchar2;