Exforsys
+ Reply to Thread
Results 1 to 4 of 4

Control Output

This is a discussion on Control Output within the DB2 forums, part of the Database category; I am using db2 database. I want to control the presentation of the rows in my final output. How can ...

  1. #1
    caradoc is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    122

    Control Output

    I am using db2 database. I want to control the presentation of the rows in my final output. How can I achieve this.


  2. #2
    Rahulbatra is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    One way to control the presentation of the rows in final output is to use Group by. I assume you know the syntax and usage of this. If not let me know and I will explain here in detail.


  3. #3
    Angela is offline Member Array
    Join Date
    Apr 2006
    Answers
    85
    Rahul thanks for your valuable input. It would be great if your could give me th syntax also with example so that I could try it out.


  4. #4
    Rahulbatra is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    Suppose you have a emp table with empname column you can associate columns having same empname as below:
    SELECT empname, COUNT(*) from emp GROUP BY empname

    Let me know if you have any doubts.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...