DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003

    Export table with CLOB field

    I need to export a table to a flat file. I've been trying 'exp' and SPOOL in sqlplus, but I'm having issues because of the presence of a CLOB field in the table. There are garbage characters all over the place in the file even though the output looks fine in sqlplus. I need to create the flat file in order to import into a MS SQL Server database table (substituting TEXT data type in MS SQL for CLOB). So, I need a way to export the table from Oracle into some delimited flat file. Oracle 8.1.7. Any ideas?
    Last edited by shadrap; 03-22-2003 at 06:14 PM.

  2. #2
    Join Date
    Jan 2001

    Can you try this

    set termout off -- supress screen output
    set colsep '|' -- column separator
    set feedback off -- Turns off rows returned count display
    set pagesize 0 -- remove column headings
    set linesize 32767 -- total # characters displayed on one line
    set long 32767 -- max width in bytes for LONG, CLOB, and NCLOB
    values (needed?)
    set null '' -- text displayed for a null value (needed?)

    spool your_file_name.txt

    select * from table

    spool off

    I think an ODBC application might also do it ..


  3. #3
    Join Date
    Nov 2000
    Pittsburgh, PA
    Why can't you use odbc and SQL Server DTS to directly import the information from Oracle?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.