Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> CLOBs and Longs and parsing them.
Environment : NT, Oracle 8.1.6
Scenario : A package body with multiple IN variables, but one being:
l_Foo LONG IN
I need to do string functions on it (length, Instr, Substr, etc)
Background : I know string manipulation is not possible with a LONG (like Instr, length, etc.) But the DBMS_LOB package does support those functionalities.
Question: How do I get l_Foo cast into a lob (or clob) type so I can manipulate it WITHIN my PL/SQL package body with DBMS_LOB? The TO_LOB command (I believe) is a SQL Plus DML command and is not supported in the PL/SQL environment. So this does NOT work:
c_clob CLOB;
c_clob := TO_LOB(l_Foo);
nor does-->
insert into tempClobTable select 1, to_lob(lngField) from someOtherTable;
Ultimate Goal : To be able to take this LONG field (no more than 32k of course) and parse it into multiple VARCHAR2(4000) fields.
Any suggestion would be appreciated.
Sean Dolan
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Dec 05 2000 - 19:11:29 CST
![]() |
![]() |