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 -> Re: What is the reverse of SQL*Loader?

Re: What is the reverse of SQL*Loader?

From: Trifon Anguelov <trifona_at_pacbell.net>
Date: Tue, 07 May 2002 22:47:27 GMT
Message-ID: <2QYB8.2214$mL2.247902324@newssvr14.news.prodigy.com>


Ramon,

Just create a query which extracts an dformats the data you need. For example:

SQL> select * from demo;

        ID DEMO_TEXT                      DEMO_DATE
---------- ------------------------------ ---------
         1 TEST                           30-APR-02
         2 TEST 2                         29-APR-02
         3 TEST 3                         28-APR-02
         4 TEST 4                         23-APR-02
         4 MONTH                          31-MAR-02
         4 YEAR                           30-APR-01
         5 YEAR2                          30-APR-01
         6 YEAR3                          30-APR-01
         7 YEAR4                          30-APR-01
         8 MONTH                          31-MAR-02
         9 MONTH                          31-MAR-02
        10 WEEK2                          23-APR-02
        11 MONTH                          30-APR-01
        12 MONTH                          30-APR-01
        13 MONTH                          23-APR-02

and then:

SQL> set pagesize 50000
SQL> set linesize 20000
SQL> set feedback off
SQL> spool c:\temp\demo.txt
SQL>
SQL> select id||'~'||demo_text||'~'||demo_date
  2 from demo;
SQL>spool off

ID||'~'||DEMO_TEXT||'~'||DEMO_DATE


1~TEST~30-APR-02
2~TEST 2~29-APR-02
3~TEST 3~28-APR-02
4~TEST 4~23-APR-02
4~MONTH~31-MAR-02
4~YEAR~30-APR-01
5~YEAR2~30-APR-01
6~YEAR3~30-APR-01
7~YEAR4~30-APR-01
8~MONTH~31-MAR-02
9~MONTH~31-MAR-02
10~WEEK2~23-APR-02
11~MONTH~30-APR-01

12~MONTH~30-APR-01
13~MONTH~23-APR-02 Hope that helps,

Trifon Anguelov
Senior Oracle DBA
http://www.dbaclick.com

chack the latest Oracle DBA forums at:
http://www.dbaclick.com/cgi-bin/ib3/ikonboard.cgi



"Ramon F Herrera" <ramon_at_conexus.net> wrote in message news:c9bc36ff.0205071010.34ec682f_at_posting.google.com...
> - Oracle 8i on Sun SPARC
>
> I have been using the 'sqlldr' with success. Now I need to
> perform the opposite: to dump a database table into an
> ASCII file, to export it elsewhere.
>
> What options do I have to do this?
>
> Thanks,
>
> -Ramon F. Herrera
Received on Tue May 07 2002 - 17:47:27 CDT

Original text of this message

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