Exforsys

Online Training

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 ...


Go Back   Exforsys > Database > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-18-2006, 02:42 AM
Senior Member
 
Join Date: Apr 2006
Posts: 144
caradoc is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-07-2007, 09:17 AM
Senior Member
 
Join Date: Apr 2006
Posts: 145
Rahulbatra is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-09-2007, 08:05 AM
Member
 
Join Date: Apr 2006
Posts: 98
Angela is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-09-2007, 08:59 AM
Senior Member
 
Join Date: Apr 2006
Posts: 145
Rahulbatra is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Comp.Sys.Acorn.FAQ part 2 of 4 Paul Vigay Tech FAQ 0 05-31-2004 09:00 PM
[gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.26) Chet Ramey Tech FAQ 0 05-27-2004 11:00 AM
Comp.Sys.Acorn.FAQ part 2 of 4 Paul Vigay Tech FAQ 0 04-30-2004 09:00 PM
Solaris x86 FAQ 2/2 Dan Anderson Tech FAQ 0 04-27-2004 08:24 PM
Apple II Csa2 FAQs: Telecom Hardware & Transfers, Part 20/25 rubywand@swbell.net Tech FAQ 0 04-04-2004 08:29 AM


All times are GMT -4. The time now is 11:07 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.