Re: How to extract table contents to files?
From: Alvin Law <alaw_at_oracle.com>
Date: 4 Jan 95 01:57:27
Message-ID: <ALAW.95Jan4015727_at_ap226sun.oracle.com>
Date: 4 Jan 95 01:57:27
Message-ID: <ALAW.95Jan4015727_at_ap226sun.oracle.com>
In article <3ebhrd$h72_at_ctsc.hkbc.hk> btsang_at_ctsc.hkbc.hk (Bosco Tsang) writes:
> How can I extract the content of an oracle 7 table to a text file in the home
> directory (unix version)?
- Use SQL*Plus
SQL> set head off SQL> set pagesize 0 linesize 0 SQL> spool $HOME/filename SQL> SELECT * FROM whatever_table; SQL> spool off
2. Use Export. The output is an ASCII file, though not very readable.
3. Write your own Pro*C/OCI program to fetch the records and write to
a file.
-- ___ (o o) +-oo0-\_/-0oo---------------------------------------------------------------+ | Alvin Law .. Project Leader, Applications Division ... Oracle Corporation | | Email: alaw_at_us.oracle.com ..... Voice: 415.506.8317 . Fax: 415.506.7299 | +---------------------------------------------------------------------------+ ORA-03113: end-of-file on communication channelReceived on Wed Jan 04 1995 - 01:57:27 CET