Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    62

    Unanswered: 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

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

  3. #3
    Join Date
    Nov 2007
    Posts
    62
    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

  4. #4
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    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.7.0.6 os 6.1.0.0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •