Re: How to create file in oracle using sqlplus
Date: 1 Apr 1999 11:20:55 GMT
Message-ID: <01be7c32$000fd840$1dd998c2_at_HNBnetra.hnb.hr.hnb.hr>
Hello!
If I understood your question, you need to spool the query result to a file.
If so, you can use this scenario:
SQL> spool c:\p.txt;
SQL> select * from x;
PK TEXT
--------- ----------
1 first row text 2 second row text 3 third row text
SQL> spool off;
Explanation:
spool c:\p.txt; - starts spooling in file c:\p.txt. Everything that is
shown on SQLPlus screen (until spool off) command is going to be spooled
(moved) to p.txt file.
select * from x; - SQL query
spool off; - ends spooling to a file p.txt;
The content of p.txt file will be:
SQL> select * from x;
PK TEXT
--------- ----------
1 first row text 2 second row text 3 third row text
SQL> spool off;
LAKSHNE <lakshne_at_aol.com> wrote in article
<19990330204311.17904.00000315_at_ng34.aol.com>...
> Hello Everyone,
>
> I have a question that " How to create file in oracle using sqlplus".
Could you
> please respond me as soon as possible.
>
> Thanks for help.
> Vijaya.
>
Received on Thu Apr 01 1999 - 13:20:55 CEST