Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Dumping contents of LONG columns to a file

Dumping contents of LONG columns to a file

From: Jason Salter <jason_at_seahorse.demon.co.uk>
Date: Tue, 27 Jul 1999 14:57:27 GMT
Message-ID: <37a4c89f.23965541@news.demon.co.uk>


I've lost the original thread of this question, but contained below is a little script I used to dump the contents of the LONG columns of a database into a text file. Worked on Oracle 7.3.4.0.1 on NT last time I tried. It's probably not too effiecient, anyone else has any ideas on how to do it?

Regards,
Jason.

CREATE OR REPLACE PROCEDURE write_long AS

---

---

BEGIN

 fileHandle := UTL_FILE.FOPEN('c:\work', 'test.txt','W');

 OPEN c_Long;
 LOOP
  FETCH c_Long INTO v_LongOwner, v_LongTab, v_LongCol;   EXIT WHEN c_Long%NOTFOUND;

    LOOP
     DBMS_SQL.COLUMN_VALUE_LONG( v_DynDDL_Curs, 2, 1000, v_Pos, v_Text, V_TextLen );

     UTL_FILE.PUT_LINE(fileHandle, v_Text);

     EXIT WHEN v_TextLen = 0;

     v_Pos := V_Pos + v_TextLen;

Received on Tue Jul 27 1999 - 09:57:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US