Re: A flat ASCII file. That's all I want. Just a flat ASCII file..
Date: 20 Mar 92 17:10:21 GMT
Message-ID: <2341_at_keele.keele.ac.uk>
From article <31008_at_darkstar.ucsc.edu>, by vangogh_at_ucscb.ucsc.edu (vangogh):
> Okay, I'm trying to get a flat data file out of Oracle. Just a flat ASCII
> file, with fields separated by pipes. I want to do this in both sqlplus and
> sqlrep. Can anyone help me out?
Yes, I have been using this method for a while: execute your SELECT with these options:
ttitle off;
btitle off;
clear breaks;
set echo off;
set embedded on;
set feedback off;
set flush off;
set heading off;
set linesize 500;
set long 400;
set newpage 0;
set null '_';
set pagesize 1;
set space 10;
set tab on;
set trimout on;
then pipe the output through a process defined by this 'lex' script:
\f[\t ]* ;
(\n\f[\t ]*)+ putchar( '\n');
[\t ]*\t[\t ]* putchar( '|');
If you don't run Oracle under UNIX, then improvise this last bit ...
--- __ __ Paul Singleton (Mr) JANET: paul_at_uk.ac.keele.cs |__) (__ Computer Science Dept. other: paul_at_cs.keele.ac.uk | . __). Keele University, Newcastle, tel: +44 (0)782 621111 x7355 Staffs ST5 5BG, ENGLAND fax: +44 (0)782 713082Received on Fri Mar 20 1992 - 18:10:21 CET