Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us