Collections:
Quickest Way to Export Data to a Flat File in Oracle
What Is the Quickest Way to Export a Table to a Flat File in Oracle?
✍: FYIcenter.com
The quickest way to export a table to a flat file is probably to use the SQL*Plus SPOOL command. It allows you to record SELECT query result to a text file on the operating system. The following tutorial exercise shows you how control the output format, start the spooler, and dump all record from a table to a flat text file:
>mkdir \oraclexe\test >sqlplus /nolog SQL> connect HR/fyicenter SQL> SET HEADING OFF; SQL> SET FEEDBACK OFF; SQL> SET LINESIZE 1000; SQL> SPOOL \oraclexe\test\employees.txt; SQL> SELECT * FROM EMPLOYEES; ...... SQL> SPOOL OFF;
You should get all records in employees.txt with fixed length fields.
2018-06-27, 812👍, 0💬
Popular Posts:
How To Define an External Table in a Text File in Oracle? You can use the CREATE TABLE statement to ...
How do you know if SQL Server is running on your local system in SQL Server? After installing SQL Se...
How To Create an Multi-Statement Table-Valued Function in SQL Server Transact-SQL? To create a multi...
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQ...
Can You Create a View with Data from Multiple Tables in SQL Server? Can You Create a View with Data ...