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: Ed prochak <ed.prochak_at_alltel.com>
Date: 27 Mar 2002 09:17:38 -0800
Message-ID: <e51b160.0203270917.3edd80cf@posting.google.com>


Richard Booker <rbooker_at_21stcentury.net> wrote in message news:<3CA1B33A.F201FD6B_at_21stcentury.net>...
> 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.
>
> Any help to point me in the right direction is appreciated.

 Once you have the data out of the database and in a flat file, SQL is not going to be much help.

Assuming you mean using SQL*PLUS, then you can test and refine the query and formatting commands. When it looks the way you want, then just spool the results to a file. Copy the file to where it needs to go.

If it needs a lot of massaging (assuming joins and such), then PL/SQL may be a possibility. If the results are not too large, you can display them using the DBMS_OUTPUT package and spool to a file. If it is large, then the DBMS_FILE package is an alternative.

If the massaging is more along the lines of formatting, sorting and merging, then a Pro*C program or PERL might be needed.

If you have any experience with it, PERL may be the best choice.

Good luck.
  Ed

-- 
Edward J. Prochak   --- Magic Interface, Ltd.
Office: 440-498-3700
on the web at       --- http://www.magicinterface.com
email: ed.prochak_at_magicinterface.com
Received on Wed Mar 27 2002 - 11:17:38 CST

Original text of this message

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