|
-
Sep 6th, 2004, 10:08 AM
#1
Thread Starter
Frenzied Member
Oracle SQL (RESOLVED)
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
Last edited by Robbo; Dec 9th, 2004 at 05:17 AM.
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day

-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-
Sep 6th, 2004, 10:36 PM
#2
Hyperactive Member
use spool to keep in text file
SQL > spool c:\output.txt
and off them when finish.
SQL > spool off
Don't leave it till tomorrow, Do It Now!
5361726176757468204368616E63686F747361746869656E

-
Sep 7th, 2004, 03:02 AM
#3
Thread Starter
Frenzied Member
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
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day

-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
-
Sep 7th, 2004, 03:42 AM
#4
Addicted Member
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.
-
Sep 7th, 2004, 04:43 AM
#5
Thread Starter
Frenzied Member
great thats a start, cheers for your help
-----------------------------------------------
"The hall is rented,"
"the orchestra is engaged,"
"its now time to see if you can dance!"
Q, Q-Who, Star Trek The Next Generation
-----------------------------------------------
General Work day

-----------------------------------------------
DOS, Win 95, Win 98 SE, Win ME, Win NT 4.0 SP6a, Windows 2000 SP3, Window XP SP1, Windows 7, Windows 8/8.1, Windows 10, Office 97 Pro, Office 2000 Pro, Office 2010, Office 2013, Office 2016, Office 2019, Visual Basic 6 (SP5), SQL, Oracle
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|