I am creating a simple output from sqlplus running a select and spooling it to a file. If I want the columns to be delimitted by a tabchar, how would I do that? I do not want to do 'select col1 || ' ' || col2 || from tablename'.
I want to be able to use a variable name in place of ' '.
How do I define it?
Thanks in advance.
06-14-2002, 02:40 PM
Shestakov
select a_col||chr(10)|b_col from your_table;
06-14-2002, 03:05 PM
stecal
There's a missing pipe (bar) on the second concatenator.
select a_col||chr(10)|b_col from your_table;
But chr(10) is for a new line.
[Edited by stecal on 06-14-2002 at 03:14 PM]
06-14-2002, 03:13 PM
Shestakov
This is just typo. Sure should be:
select a_col || chr(9) || b_col from your_table;
-----------------------------------------------------------
SQL> select 'abc' || chr(9) || 'def' from dual;