Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Save Query Output to a Local File
How To Save Query Output to a Local File? - Oracle DBA FAQ - Introduction to Command-Line SQL*Plus Client Tool
✍: FYIcenter.com
Normally, when you run a SELECT statement in SQL*Plus, the output will be displayed on your screen. If you want the output to be saved to local file, you can use the "SPOOL fileName" command to specify a local file and start the spooling feature. When you are done with your SELECT statement, you need to close the spool file with the "SPOOL OFF" command. The following tutorial exercise gives you a good example:
SQL> connect HR/retneciyf SQL> SET HEADING OFF SQL> SET FEEDBACK OFF SQL> SET LINESIZE 1000 SQL> SPOOL \temp\employees.lst SQL> SELECT * FROM EMPLOYEES; ...... SQL> SPOOL OFF
You should get all records in employees.lst with fixed length fields.
2007-04-29, 6577👍, 0💬
Popular Posts:
How To Write a Query with a Right Outer Join? - Oracle DBA FAQ - Understanding SQL SELECT Query Stat...
What will be printed as the result of the operation below: main() { int x=20,y=35; x=y++ + x++; y= +...
What will be printed as the result of the operation below: main() { int a=0; if (a==0) printf("Cisco...
How To Empty Your Recycle Bin? - Oracle DBA FAQ - Managing Oracle Database Tables If your recycle bi...
How Is the Width a Parent Element Related to Child Elements? - CSS Tutorials - Understanding Multipl...