![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have my table definition in the below manner CompanyID, DateViewed, Views. I need to get the sum of all the views of a particular company between specified dates. select sum(views),DateViewed from tblCompany group by CompanyID having DateViewed between '02/23/2004' and '02/24/2004' I get the following error : Column 'tblCompany.DateViewed' is invalid in the HAVING clause because it is not contained in either an aggregate function or the GROUP BY clause. Do I need to use a correlated query? |
![]() |
| Thread Tools | |
| Display Modes | |
| |