Exporting to a tab delimited file - no spaces

  • From: "Kristen Cameron" <cameronkgd@xxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 04 Oct 2004 18:00:11 -0400

List,
 
One of my clients wants a script that will export 28 tables to a tab-delimited 
format.  I have managed to use 'set colsep' to set the delimiter to a tab.  
This resulted in a tab-delimited file, but all the fields were padded with 
spaces to the max field width.  The spaces cause problems for the software 
destined to use these files.
 
The other options is select col1 || chr(9) || col2 ... etc., but I don't want 
to have to type each column name for 28 tables.  I also know lots of ways to 
clean up the files once they are created, but I'm looking for a way to get a 
clean file right from the SQL prompt.
 
Does anyone have a neat trick to help out with this one?
Oracle 8.1.7 running on Windows 2000.
 
Thanks!
 
------------------------------------------------------
Kristen Cameron
 
Database Administrator | Administrateur de bases données
Information Management Group  |  Groupe de gestion de l'information
Indian and Northern Affairs Canada  |  Affaires Indiennes et du Nord Canada
Yellowknife, NT  X1A 2R3
(867)669-2536 | cameronkgd@xxxxxxxxxx
-----------------------------------------------------

--
//www.freelists.org/webpage/oracle-l

Other related posts: