that fixed it. I was under the impression from the error message that I had to have something in there for each aggregated column (I think the error msg was either misleading or too generic). Reading some other posts elsewhere, it seems that the HAVING clause perhaps only works on an aggregated column. Here was a good summary:
"WHERE clause introduces a condition on individual rows; HAVING clause introduces a condition on aggregations, i.e. results of selection where a single result, such as count, average, min, max, or sum, has been produced from multiple rows. Your query calls for a second kind of condition (i.e. a condition on an aggregation) hence HAVING works correctly.
As a rule of thumb, use WHERE before GROUP BY and HAVING after GROUP BY. It is a rather primitive rule, but it is useful in more than 90% of the cases."
source:
https://stackoverflow.com/questions/9253244/sql-having-vs-whereThanks for the suggestion.
Albert
>What happens if you change "AS IndexRate" to AS "cIndexRate" -- thus eliminating any confusion as to the reference in the HAVING clause?
>
>Hank