Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2007
    Posts
    197

    Smile Unanswered: problem relted to db2clp

    suppose i execute command

    select ID from TPUBI

    if there are large no of records

    i cant see the first one

    how could see in window record at a time then press enter other window record shows

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You cannot do that as far as I know. You best bet would be to redirect the output to a file for viewing. To do this you would use a command like:

    update command options using z on d:\merge_andy_str.sql
    select * from bigtable
    update command options using z off

    Andy

  3. #3
    Join Date
    Jun 2006
    Posts
    471
    pipe the output to a file - pg the file - head - tail
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Additionally, You can use cursors or execute separate SQL statements. You can also avoid the files by directly piping the output of the query to a pager:
    Code:
    $ db2 "select ..." | less
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  5. #5
    Join Date
    Jan 2003
    Posts
    1,605
    Quote Originally Posted by stolze
    Additionally, You can use cursors or execute separate SQL statements. You can also avoid the files by directly piping the output of the query to a pager:
    Code:
    $ db2 "select ..." | less
    Hi,
    or on Windows...
    Code:
    $ db2 "select ..." | more
    Pressing Enter list downs one row at a time. Pressing space list downs one page at a time.
    Thanks,
    Grofaty

Posting Permissions

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