| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Unload data to ascii files using pl/sql
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
![]() |
![]() |