Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select * from table into outfile

Status
Not open for further replies.

saw15

Technical User
Jan 24, 2001
468
US
I am trying to run the following from sqlplus:

SELECT * FROM myDatabase.claims_vw INTO OUTFILE 'c:\tmp\claims.txt' FIELDS TERMINATED BY '|';

But it is erroring out with: sql command not properly ended.

This is an 8i database.

Help is appreicated.
 
Hi,

I think what you are trying above is MySQL statement to load data. In oracle if you need to exprot the Data into a flat file you need to do like one below.

spool outfile.txt
select * from myDatabase.claims_vw;
spool off


Cheers,
Venu
 
The syntax is invalid. At least for Oracle.

Try something like

set colsep |
spool c:\tmp\claims.txt
SELECT * FROM myDatabase.claims_vw;
spool of

Regards, Dima
 
Thanks, that's what I thought.

Appreciate the quick response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top