Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Krilyn
Starting Member
7 Posts |
Posted - 2005-10-12 : 19:04:52
|
| Basically setup is thisSelect A, B from tableGroup by A, B Having Cproblem is I need to have a having thats not in the group by and it won't let me since due to that fact. If anyone has any help it would be greatly appreciated. |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2005-10-12 : 19:10:28
|
| You're going to have to be more specific if you want a specific answer. But in short, you are correct. The HAVING is applied after the grouping is done, and therefore it can only reference things in the GROUP. On the other hand, if what you really wanted was to filter out rows before grouping, then you can still put in a WHERE clause between the FROM and GROUP BY clauses.---------------------------EmeraldCityDomains.com |
 |
|
|
Krilyn
Starting Member
7 Posts |
Posted - 2005-10-12 : 19:13:29
|
| That answers my question. Didn't lay it out as well as I wanted to. Thanks for the information. |
 |
|
|
|
|
|