Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Data Dump
Ed Gillispie wrote:
>
> Does any one have a script that will dump the data from a selected
> Oracle table (preferably in the order of the primary key) to an ASCII
> text file for loading to a mainframe?
>
> Your help is greatly appreciated!
Hi,
Use SPOOL command from SQL*PLus to extract data from a table
ex: (If you want comma delimiter between values)
SET HEADING OFF
SET TERMOUT OFF
SET FEEDBACK OFF
SET LINESIZE 80
SET PAGESIZE 40
SPOOL TEST.TXT
SELECT COL1||','||COL2||','||COL3
FROM TABLE;
SPOOL OFF
Hope This Helps.
Amarendra
-- ****************************************************************************** AMARENDRA B NETTEM 5039 N E River Road, Apt. 1A Oracle Certified DBA (OCP) NORRIDGE, IL 60656 Whittman-Hart Inc., 311 South Wacker Drive, Suite 3500 Chicago, IL 60606. Ph.No. (708) 583 9870 (H) (312) 913 6758 (W) E-mail:nettama_at_charlie.cns.iit.edu, anettem_at_whittman-hart.com Homepage: http://www.iit.edu/~nettama **************************************************************************** Opinions are mine and do not necessarily reflect those of Whittman-hart Inc.Received on Wed Nov 19 1997 - 00:00:00 CST