Anyone have a good set of sqlplus configuration directives to help transform a given sql query into nicely tab separated output for pulling into a spreadsheet or further processing?
As Justin pointed out in his link, using the set colsep
function SQLPlus command saves typing a separator for each column.
But for tab-delimited, set colsep Chr(9)
won't work.
For UNIX or LINUX, use set colsep ' '
with the space between the single-quotes being a typed tab.
For Windows, use these settings:
col TAB# new_value TAB NOPRINT
select chr(9) TAB# from dual;
set colsep "&TAB"
select * from table;