If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > New line character inserted after each varchar column ???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-26-08, 16:57
vilius vilius is offline
Registered User
 
Join Date: Nov 2007
Posts: 55
New line character inserted after each varchar column ???

Hi,

I'm trying to select some data from syscat system tables of my db.
db - server AIX 5.1
dbms - ibm db2 v8.2
using db2 runtime client command line tool, putty through ssh

I noticed some strange behaviour - if system table column is of type varchar - then after each this column data new line symbol is printed out. For example if I select 3 columns of type varchar - my select statement single data row output occupies 3 lines. Select outputs look really bad.

This is by design, or I can fix this ?? I just need one data row per line.

thanks
Vilius
Reply With Quote
  #2 (permalink)  
Old 04-27-08, 13:17
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I guess this is due to your environment because DB2 doesn't do something like that. Maybe your shell tries to be too smart and wrap the lines for you. You may want to pipe the query output through "less -S" to see how lines are wrapper; or you redirect the output to a file and look at it there.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 04-28-08, 07:28
vilius vilius is offline
Registered User
 
Join Date: Nov 2007
Posts: 55
Hi,
This was my mistake, I never thought that single varchar field could occupy all my screen width(and more). As soon as I gave enough(a lot!) screen width everything looks fine. Thanks everyone.

Vilius
Reply With Quote
  #4 (permalink)  
Old 04-28-08, 08:31
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Dude, you got to be more specific. When I read your post the first ime I had no clue what youa re reffering too.

Yes, if the column is wider then a screen it will spill on a new line. try using substring. There is no new line simbol.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On