Re: Dumping oracle table to ascii delimited file?

From: Jennifer R. Amon <bamon_at_ocvaxc.cc.oberlin.edu>
Date: Tue, 11 Jan 1994 10:13:20 -0500
Message-ID: <bamon-110194101320_at_amon.cc.oberlin.edu>


In article <2gsjol$6al_at_charm.magnus.acs.ohio-state.edu>, phart_at_magnus.acs.ohio-state.edu (Patrick S Hart) wrote:

> Can anyone tell me how to dump an oracle table into an ascii delimeted file? >I would like to do this to assist in altering tables with data in them. Or
> perhaps there is a better way? You would think it would be simple.

You can get fancy and do what I did: write a pro*C program that reads the data dictionary and uses dynamic SQL to dump the contents of any specified table, with choice of delimiters, options to omit or include specific columns, and ordering criteria, etc. etc. etc.

It's easier just to spool a select to a file or create a temporary table. I usually just:

  create table xxx_temp as select * from xxx;   delete xxx;
  alter table xxx ...;
  insert into xxx select ..... from xxx_temp;


Jennifer R. Amon            PHONE: (216) 775-6987
Houck Computing Center        FAX: (216) 775-8573
Oberlin College
Oberlin, OH 44074        INTERNET: bamon_at_ocvaxc.cc.oberlin.edu
_____________________________________________________________________
Received on Tue Jan 11 1994 - 16:13:20 CET

Original text of this message