Collections:
Export Data with Field Delimiters in Oracle
How To Export Data with a Field Delimiter in Oracle?
✍: FYIcenter.com
The previous exercise allows you to export data with fixed field lengths. If you want export data with variable field lengths and field delimiters, you can concatenate your fields with an expression in the SELECT clause as shown in the tutorial exercise bellow:
SQL> SET HEADING OFF; SQL> SET FEEDBACK OFF; SQL> SET LINESIZE 1000; SQL> SPOOL \oraclexe\test\fyi_links.txt; SQL> SELECT id ||','|| url ||','|| notes ||','|| counts ||','|| created FROM fyi_links; ...... SQL> SPOOL OFF;
You should see all records in fyi_links.txt with ',' delimited fields as shown here:
101,fyicenter.com,Session 1,,17-MAY-06 110,centerfyi.com,Session 1,,17-MAY-06
⇒ What Is SQL*Loader in Oracle
⇐ Quickest Way to Export Data to a Flat File in Oracle
2018-06-27, 2904🔥, 0💬
Popular Posts:
How Run SQL*Plus Commands That Are Stored in a Local File in Oracle? If you have a group of commands...
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
How To Use "IF ... ELSE IF ..." Statement Structures in SQL Server Transact-SQL? "IF ... ELSE IF ......
How to obtain the number of rows found by the last SELECT statement using the FOUND_ROWS() function?...
How To Convert Binary Strings into Integers in SQL Server Transact-SQL? Binary strings and integers ...