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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unload Table Data to Flat Files

Re: Unload Table Data to Flat Files

From: Lou Fangxin <anysql_at_gmail.com>
Date: Thu, 17 Nov 2005 10:25:49 +0800
Message-ID: <ea5907d30511161825nf2b20f3q6f9d4a86b9ef008c@mail.gmail.com>


Mybe you can try using OCIULDR (free download on my page), and specify an special char as the record seperator and field seperator.  http://www.anysql.net/en/p/ociuldrusage.php

 On 11/16/05, d cheng <dc4oracle_at_yahoo.com> 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://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/>
>
>

--
Welcome!
Home: http://www.anysql.net/en/

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 16 2005 - 21:28:58 CST

Original text of this message

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