Re: Unload Table Data to Flat Files

  • From: Lou Fangxin <anysql@xxxxxxxxx>
  • To: dc4oracle@xxxxxxxxx
  • Date: Thu, 17 Nov 2005 10:25:49 +0800

Mybe you can try using OCIULDR (free download on my page), and specify an
special char as the record seperator and field seperator.

 On 11/16/05, d cheng <dc4oracle@xxxxxxxxx> wrote:
> Hi Listers,
>  I need to unload several large database tables unto flat files on a Unix
> database server. I am using Tom Kyte's SQL*Plus unloader. However, there
> seems to be a problem when a varchar column contains a ^M (CR) within it.
> All other columns to the right of this are truncated and missing from the
> record in the flat file. Is there a way to workaround this truncation issue?
> I would like to NOT scrub the data by removing the carriage return as the
> end-users might expect them to be there.
>  Below are the SQL*Plus settings in effect when the extraction SQL
> statement was issued. If I 'set wrap on', I will see all the data for the
> varchar column but they are split on multiple lines - I need them to be on a
> single line.
>  set wrap off
> set l inesize 32767
> set trimspool on
> set feedback off
> set pagesize 0
> set verify off
> set termout off
> spool test.sql
> select
> c1||chr(199)||
> c2||chr(199)||
> n3||chr(199)||
> c4||chr(199)||
> d5||chr(199)||
> n6
> from my_table
> spool off;
>  Thank you in advance for your help!
>  - David
> ------------------------------
> Yahoo! FareChase - Search multiple travel sites in one 
> click.<**http%3a//>


Other related posts: