Re: Flatfiles from oracle tables

From: David Bath <dtb_at_otto>
Date: 12 Mar 93 02:49:36 GMT
Message-ID: <dtb.731904576_at_otto>


GO.MSB_at_isumvs.iastate.edu writes:

>This bounced from mail so am posting.
 

>In article <1993Mar5.211729.12302_at_newsgate.sps.mot.com>,
>beutel_at_chdasic.sps.mot.com (Jim Beutel) writes:
>>
>>Help is an understatement. We currently have a need to dump
>>the entire database for input into another application. New
>>project is DDTS on the workstation. Needless to say Export /
>>Import will not work. Currently executing daily full export.
>>Total dumped file is only 17000 blocks. Not very big really.
>>

Yep, other replies showed the basic logic. However, there is a PD utility called unload (most rename it to sqlunload) that takes a SELECT and creates an Oracle Data Loader data file and control file.

This is avail from comp.sources.misc (I think), but I will post to net if enough people hassle me for it.

Other ways (on UNIX) involve running an export file through strings(1) and then hacking the file produced. Basically you need to join all lines, avoiding those that start with "CREATE", "INSERT" et cetera. Use perl or awk to do the hacking. This will give you a SQL script.

-- 
David T. Bath             | Email:dtb_at_otto.bf.rmit.oz.au (131.170.40.10)
Senior Tech Consultant    | Phone: +61 3 347-7511 TZ=AEST-10AEDST-11
Global Technology Group   | 179 Grattan St, Carlton, Vic, 3153, AUSTRALIA
"The robber of your free will does not exist" - Epictetus
Received on Fri Mar 12 1993 - 03:49:36 CET

Original text of this message