Re: Need a SQL*UNLoader
Date: 13 Dec 1994 14:10:28 GMT
Message-ID: <3cka0k$h81_at_clarknet.clark.net>
Richard W. Harris (rwh4+_at_pitt.edu) wrote:
: In article <3chrgs$cc5_at_killerbee.jsc.nasa.gov> sspruell_at_ssf3.jsc.nasa.gov (Steven Spruell) writes:
: >From: sspruell_at_ssf3.jsc.nasa.gov (Steven Spruell)
: >Subject: Need a SQL*UNLoader
: >Date: 12 Dec 1994 15:50:52 GMT
: >Has anyone got any info on products or techniques to generate a delimited
: >export file from Oracle tables? I know I can use sqlplus or Reports and
: >generate a separate report for each table, but I was looking for something
: >a little more generic. I guess Oracle is under the impression that no one
: >would ever want to EXPORT data FROM Oracle, sort of like once you've reached
: >nirvana, why would you want to go back?
: I've never actually tried this (I guess I'm in nirvana :-), but,
: 1. Go into SQLPLUS.
: 2. set echo off
: 3. set heading off
: 4. set termout off
: 5. set feedback off
: 6. spool <output file name>
: 7. select <field 1>||','||<field 2>||','||<field 3> (etc) from (etc);
: 8. spool off
: 9. exit
: Let me know how it works out.
I think the operative word above is "generic." What you've proposed is not a generic solution, but a pain in the ass. Especially for tables with many columns.
The inability to easily export data from Oracle to other formats is one of the things I found most frustrating when I started working with it as well. The last database I worked with before Oracle was Watcom's SQL engine for Windows. While it certainly isn't as industrial strength as Oracle, one of the nice features of its language extension to ANSI SQL is an "output" statement. After you do a select statement you can use the command "output to <filename> format <output format> [delimited by...", where <output format> can be ascii, lotus, dbase, fixed, etc.
I was shocked when I paid about 10 times as much for my Oracle system and couldn't do something similar. In any case, _generic_ solutions to your problem are: 1) code an "output" function in one the the procedural extensions to Oracle (PL/SQL, Pro*C) or 2) buy a front end tool to Oracle. I'm using "Open Query Builder for Windows" by Wang. It's cheap and it allows me to do much of what I want to do and it outputs data to fixed and delimited ascii as well as dde links to other Windows apps.
Larry Received on Tue Dec 13 1994 - 15:10:28 CET