Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having vs. Where

Status
Not open for further replies.

GSMike

Programmer
Feb 7, 2001
143
US
Are there pro's and con's to using "Having" instead of "Where" in an SQL statement. Are the results ever different? It seems that "HAVING" is less reliable than "WHERE", but I haven't tested it out definitively so that I know that for sure.
Thanks for your help.
-Mike Mike Kemp
kempm541145@yahoo.com
 
From MS Access Help:

WHERE Clause

Specifies which records from the tables listed in the FROM clause are affected by a SELECT, UPDATE, or DELETE statement.

HAVING Clause

Specifies which grouped records are displayed in a SELECT statement with a GROUP BY clause. After GROUP BY combines records, HAVING displays any records grouped by the GROUP BY clause that satisfy the conditions of the HAVING clause.

------------------------------------

There is no reliability issue between WHERE and HAVING. The issue is when to use each clause. It would be good to read the descriptions in HELP to get a better understanding. Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top