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

Home -> Community -> Usenet -> c.d.o.misc -> Re: sql processing of local tables

Re: sql processing of local tables

From: Knut Talman <knut.talman_at_mytoys.de>
Date: Wed, 27 Mar 2002 13:07:15 +0100
Message-ID: <3CA1B5F3.327D887C@mytoys.de>


> Is it possible to do SELECT statements on the server and write result
> tables to my C: drive and then use SQL to further process them there?
>
> I'm brand new to Oracle and SQL.
>
> I need to produce a flat file (ASCII fixed) for another agency from an
> Oracle 8i database residing on a web server in our DMZ.
>
> Because the format of the flat file is so different from our Oracle
> tables, I will need to do a quite a bit of massaging of the data.

You can use SQL*Plus on the client. With the spool command , SQL*Plus spools the result of the query in the specified output file. Example:

SQL> set heading off
SQL> set pagesize 0
SQL> set feedback off
SQL> spool c:\query_result.txt
SQL> select a || ',' || b from my_table;     (*)

024864,sdghsjkdgh
<something is written here>

SQL> spool off

(*) I used this form of query to have a comma separated list.

Regards,

Knut Received on Wed Mar 27 2002 - 06:07:15 CST

Original text of this message

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