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: Unload data to ascii files using pl/sql

Re: Unload data to ascii files using pl/sql

From: John Russell <netnews2_at_johnrussell.mailshell.com>
Date: Fri, 01 Feb 2002 06:52:01 GMT
Message-ID: <f8ek5u8t9sh9hah3m97ufhb3o6tmmpifcl@4ax.com>


On Thu, 31 Jan 2002 17:03:27 -0000, "pankaj" <pankaj.patel_at_ladbrokes.com> wrote:
>I am quite new Oracle and PL/SQL and need some help. I have been asked to
>unload some data ...well quite a lot of data from the Oracle instance I
>have.
>My question is does PL/SQL or Oracle have an unload statement i.e
>
>
>unload to /tmp/xx.unload
>select * from tab1 , tab2
>where tab1.id = tab2.id
>and tab1.customer_stake > 100

In SQL*Plus you could say

spool xx.unload

and then do your SELECT statements to output in exactly the right format, such as

select col1 || ',' || col2 || ','...

In SQL*Plus, there are some settings you also need to set so the column headings, SQL statement, etc. don't get echoed. (ECHO, FEEDBACK, PAGESIZE, TRIMSPOOL, probably some others.)

John

--
Got an Oracle database question?
Try the search engine for the database docs at:
http://tahiti.oracle.com/
Received on Fri Feb 01 2002 - 00:52:01 CST

Original text of this message

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