Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

A question about SET COLSEP '|'

dariyooshMay 28 2010 — edited May 28 2010
Hello everybody,


I have a question about directing query output into TXT file. At the beginning of my sql script file I write
SET TRIMSPOOL ON;
SET COLSEP '|';
This allows me to have the query result as a pipe delimited file. However, there are always several space characters between pipe and the columns, that is, for example instead of having
a1|b1|c1|d1
a2|b2|c2|d2
a3|b3|c2|d3
I obtain the following:
a1   |   b1   |   c1  |  d1
a2   |   b2   |   c2  |  d2
a3   |   b3   |   c2  |  d3
As long as you open this file with Excel, this is not really annoying, but the problem is that my TXT file is read directly by a KornShell script and these undesired space characters cause problem. Is there any way to get rid of them?


Thanks in advance,

Kind Regards,
Dariyoosh
This post has been answered by Frank Kulash on May 28 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2010
Added on May 28 2010
3 comments
8,899 views