Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

spool - outputing a file with data only

721230Sep 7 2009 — edited Sep 7 2009
Hi,

I am using Oracle SQL*PLUS and I am relatively new to this.
I am trying to output a file which have data only and using the below.

SQL> spool on
SQL> spool d:\dept.txt
SQL> select abc from dept where rownum <4;

abc
---------
123
234
345

3 rows selected

SQL> spool off

This actually outputs the entire text from the "select" command till "3 rows selected". Is there a way I can only output the data like
123
234
345

Thanks in advance
Tej
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2009
Added on Sep 7 2009
4 comments
2,848 views