Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006

    Unanswered: DB2 Output Format

    I'm working on DB2 UDB 8.2.5, on AIX 5.3 - I know MySQL has a cool feature where it allows you to display the output of a query in a vertical format instead of columnar, if the size of the data row exceeds the number of columns defined in your shell environment, and that could be done by appending "\G"; to the SQL statement. In DB2, however, I'm not able to find a way to display the returned data in a similar way. If I run a query on a table and I redirect stdout to a file, the results are not displayed as neatly as they are in MySQL, Oracle or Informix.

    Does anybody know of a way to accomplish this?
    here's an example:
    select * from my_table
    11/01/1949 02/17/2006 - Y 2006-10-12- 2006-10-12-
    Instead, I want the data to appear like this:
    column1 11/01/1949
    column2 02/17/2006
    column3 Y
    column4 2006-10-12-
    ... you get the idea.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5

  3. #3
    Join Date
    Jul 2006
    Pune , India
    i was eagerly waiting for some1 to answer this question.
    The link is really good.

Posting Permissions

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