Hi ASP'ers,
I'm reading a SQL Server 7 table in my ASP...
sql = "SELECT Carrier, SUM(ItemCount) as totUnits FROM LoadHist WHERE year(DateClosed) = 2002 AND month(DateClosed) = 5 GROUP BY Carrier"
_________________________________________________________
I don't need to group. If I remove the GROUP BY clause.. get this error:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Column 'LoadHist.Carrier' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause.
I just need to sum-up the ItemCount for the entire recordset.
Thanks, John
I'm reading a SQL Server 7 table in my ASP...
sql = "SELECT Carrier, SUM(ItemCount) as totUnits FROM LoadHist WHERE year(DateClosed) = 2002 AND month(DateClosed) = 5 GROUP BY Carrier"
_________________________________________________________
I don't need to group. If I remove the GROUP BY clause.. get this error:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Column 'LoadHist.Carrier' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause.
I just need to sum-up the ItemCount for the entire recordset.
Thanks, John