Re: Extracting data from tables

From: Michael J. Moore <hicamel_x_the_spam_at_attbi.com>
Date: Tue, 10 Sep 2002 17:07:24 GMT
Message-ID: <gFpf9.257227$_91.285994_at_rwcrnsc51.ops.asp.att.net>


You can execute SQLPlus in a batch mode. When you execute it, you give it the name of a script file. The script file would then do the necessary set-up, like spool output to a file, set headers off and such, then it will execute your SELECT command which would look something like this if you want comma delimited output....
SELECT fld1,',',fld2,',',fld3 FROM MYTABLE;

OR you could write a PL/SQL procedure that uses file i/o, and schedule it using oracle's job scheduler.

Mike

"Kim Jensen" <Kimbj_at_e-mail.dk> wrote in message news:alkejd$216b$1_at_news.cybercity.dk...
> I am in the process of moving our OracleRDB to Oracle9i on a WinXP server,
> for that I need to reproduce a functionality given in RDB: rmu/extract.
 What
> this does basically, is that it provides me with a flat/ASCII file with
 the
> contents of the desired table, having the columns enclosed in a selectable
> character.
>
>
>
> I've taken a glimpse at the exp functionality, but it seems to me, to be
> exporting in binary format, suitable for reloading in another Oracle
> database.
>
>
>
> I am aware, that I could select the table in sql-worksheet and copy/paste
 it
> to a txt file, but the process has to run without human intervention every
> night.
>
>
>
> Any help would be highly appreciated -I am probably missing the obvious
> answer/utility, but neither metalink nor TechNet could provide me with
> anything useful.
>
>
>
> Tia,
>
>
>
> Kim Brandt Jensen
>
>
>
> Danish Confedration of Trade Unions
>
>
>
>
>
>
>
Received on Tue Sep 10 2002 - 19:07:24 CEST

Original text of this message