Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

difference between when clause and a having clause

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
arindambanerjee

New User


Joined: 30 Jun 2007
Posts: 39
Location: India

PostPosted: Sat May 10, 2008 11:31 pm    Post subject: difference between when clause and a having clause
Reply with quote

hii,
can any one explain me the difference between where clause and a having clause with an example. i mean where to use each of them and in which situations other than the fact that we need to use groupby in case of having.
i have gone through the materials but i couldn't find the exact difference and the exact circumstances in which we should use.

thanks in advance.[/i]
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 10, 2008 11:53 pm    Post subject:
Reply with quote

Hello,

Usually we have a requirement and look for a solution. You appear to have found some solution and are trying to look for a requirement to use it.

WHERE specifies one or more columns. HAVING specifies a result table.

Are you familiar with the "IBM Manuals" link at the top of the page? Several sets of DB2 documentation are available there. These (as well as the other sets of documentation) are your friend icon_smile.gif

Here's a link to what i believe will help you:http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnsqj10/4.2.5?

If you have a requirement, and post it, someone may have suggestions.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Sun May 11, 2008 6:28 am    Post subject:
Reply with quote

WHERE clause is used to select the matching rows according to a condition.

HAVING clause is used to select the matching rows according to a condition to form a GROUP.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us