Re: Creating ASCII delimited files
Date: 1998/09/05
Message-ID: <35F19708.2EBB3D8C_at_u.washington.edu>#1/1
The easiest is to use a delimiter to concatanate the fields together..
select field1 || '|' || field2 || '|' || field3 from tableX
generating for each row field1|field2|field3 Similarly you can add quotes around appropriate text fields.
I also recommend to remove feedback, echo, etc with:
set echo off
set feedback off
set pagesize 0
set heading off -- remove the heading for the first line. set termout off -- stop display to screen spool fileX -- name of the file.
[Quoted] The other issue is that SQLPlus is generates a fixed size line even if the line does not need the extra character space. Also, the line is truncated to the maximum size of the line. A bit of a balancing act
Also, it is often a good idea to put a delimiter at the end of the list of fields.
Mike Krolewski
Joe Humphreys wrote:
> I'm using SQL*PLUS commands and spooling the data to create an ASCII file.
> The data comes into the file fixed format. How can I get it to come in
> delimited (commas or tabs)?
Received on Sat Sep 05 1998 - 00:00:00 CEST
