is there a way of copying contents of a SQL string in SQL Plus to copy the contents for the statement to a txt, or csv file? need on large tables? i know in dos you can use ">> dir.txt" anything like this in SQL??
Thanks in Advance
Printable View
is there a way of copying contents of a SQL string in SQL Plus to copy the contents for the statement to a txt, or csv file? need on large tables? i know in dos you can use ">> dir.txt" anything like this in SQL??
Thanks in Advance
use spool to keep in text file
SQL > spool c:\output.txt
and off them when finish.
SQL > spool off
so example
SQL > spool c:\output.txt
SQL >SELECT * FROM table1 WHERE Field = 'Yes'
SQL > spool off
would this put into a text file, will this put headers in too? column titles or just data, just want to archive data off
everything that comes between spool and spool off will go into the text file
u cannot start the same txt file once u have spooled off.
also the spool is stopped if u disconnect.
great thats a start, cheers for your help