Re: How to query Oracle from UNIX (AIX)?

From: Eric M. Gamble <emgamble_at_rwxc.com>
Date: 1997/01/21
Message-ID: <01bc0795$e67b67e0$f9b193cf_at_egamble>#1/1


> >> I want to extract data from Oracle Server 7 into textfiles from
> >> a UNIX (AIX) machine. What do I need to be able to do this?
> >>

The following logic should work for you:

(flat.sql) /* prepare sql query for text file outout */ set newpage 0

set space 1		/* space between fields  *'
set linesize 1024  	/* set to the size of the record length of query */
set pagesize 0
set feedback off
set heading off
set echo off
set term off

(myquery.sql) /* query to be issued to produce the text file */ _at_flat.sql
spool myfile.txt
select * from TABLENAME;
spool off
exit;

After building the files above issue the following command:

--> sqlplus id/password _at_myquery.sql

This will build your flat file. Received on Tue Jan 21 1997 - 00:00:00 CET

Original text of this message