dbTalk Databases Forums  

non-aligned columns in sqlplus ?

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss non-aligned columns in sqlplus ? in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin T.
 
Posts: n/a

Default non-aligned columns in sqlplus ? - 11-07-2006 , 01:37 PM






Hello!
(O 9i2)

Is it possible with SQLPlus to produce output without any aligning of
the columns.
I only found I can change the column separator char, but this wont help
me dump some data to a text file if everything get's padded up.

So is it possible to produce
MY_ID;MY_TEXT;MY_DATE
-------------------------
23;This is a text;2006-08-01

instead of
MY_ID ; MY_TEXT ; MY_DATE
-------------------------
23 ; This is a text ; 2006-08-01

?

Thanks!


Reply With Quote
  #2  
Old   
Gints Plivna
 
Posts: n/a

Default Re: non-aligned columns in sqlplus ? - 11-07-2006 , 03:08 PM






Martin T. wrote:
Quote:
Hello!
(O 9i2)

Is it possible with SQLPlus to produce output without any aligning of
the columns.
I only found I can change the column separator char, but this wont help
me dump some data to a text file if everything get's padded up.

So is it possible to produce
MY_ID;MY_TEXT;MY_DATE
-------------------------
23;This is a text;2006-08-01

instead of
MY_ID ; MY_TEXT ; MY_DATE
-------------------------
23 ; This is a text ; 2006-08-01

?

Thanks!
select MY_ID || ';' || MY_TEXT || ';' || to_char(MY_DATE, 'yyyy-mm-dd')
from my_table

Gints Plivna
http://www.gplivna.eu



Reply With Quote
  #3  
Old   
Martin T.
 
Posts: n/a

Default Re: non-aligned columns in sqlplus ? - 11-08-2006 , 01:09 AM



Gints Plivna wrote:
Quote:
Martin T. wrote:
Hello!
(O 9i2)

Is it possible with SQLPlus to produce output without any aligning of
the columns.
I only found I can change the column separator char, but this wont help
me dump some data to a text file if everything get's padded up.

So is it possible to produce
MY_ID;MY_TEXT;MY_DATE
-------------------------
23;This is a text;2006-08-01

instead of
MY_ID ; MY_TEXT ; MY_DATE
-------------------------
23 ; This is a text ; 2006-08-01

?

Thanks!

select MY_ID || ';' || MY_TEXT || ';' || to_char(MY_DATE, 'yyyy-mm-dd')
from my_table

Indeed yes.
Been a bit blind here :-)

thanks!



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.