How to select a huge table in a readable format?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • balucec
    New Member
    • Apr 2010
    • 4

    How to select a huge table in a readable format?

    i need to list the contents of a very huge table. now i use the query SELECT * to do it. but the result is not understandable. rows are overlapped in the result.
    kindly provide a solution for doing this. is there any other way rather than using SELECT *??

    NB: I want the whole table to be displayed using a single qery. and not like using select (name, id etc) from table name and going for the next set of columns in another select.

    Kindly help me if you know a solution
  • patjones
    Recognized Expert Contributor
    • Jun 2007
    • 931

    #2
    Originally posted by balucec
    i need to list the contents of a very huge table. now i use the query SELECT * to do it. but the result is not understandable. rows are overlapped in the result.
    kindly provide a solution for doing this. is there any other way rather than using SELECT *??

    NB: I want the whole table to be displayed using a single qery. and not like using select (name, id etc) from table name and going for the next set of columns in another select.

    Kindly help me if you know a solution
    Are you viewing the results in the DB2 terminal window, or are you having this problem when you export the report to an external file (for instance .txt, .xls, or something like that)?

    Pat

    Comment

    • balucec
      New Member
      • Apr 2010
      • 4

      #3
      Originally posted by zepphead80
      Are you viewing the results in the DB2 terminal window, or are you having this problem when you export the report to an external file (for instance .txt, .xls, or something like that)?

      Pat
      this is wen i view it in db2 terminal.
      pls explain how to import it to external file

      Comment

      • patjones
        Recognized Expert Contributor
        • Jun 2007
        • 931

        #4
        Bear in mind that I'm using a TSO environment on a Windows XP machine, so this process might be a little different if, for instance, you are using UNIX.

        The syntax that I use to do this, when the report is being viewed, is

        Code:
        EXPORT REPORT TO [I]datasetname[/I]

        where datasetname has to be eight characters or less. You need to make note of the full name that the system assigns to your dataset. This is the basic form of the command; there are various switches that can be used to refine the output. For instance, you can specify output in XML, HTML, etc.

        What this does is puts your information in a TSO dataset that resides on the mainframe. Again, what you do from this point might differ from what I do in my enviroment.

        I have to back out to the main DB2 menu where there is a file transfer option. I select that option and then pick Transfer > Receive... from the menu in the terminal window. This brings up a dialog that allows you to specify where on your local drive or network to put the file, and specify what the name of the dataset is.

        If the file gets successfully exported, you have a choice as to what application to use to open; I usually open it with Excel, but I have occasionally used the HTML data format option and opened it in a browser window.

        Let me know what you think, and perhaps we can figure out what to do in your specific situation.

        Pat

        Comment

        Working...