I'm querying an SQL view into a DataSet inside VB.net.
I've been trying to do a simple Group By in my DataSet query that returns the error:
Column "'KitWIP.DUE_DATE is invalid in the selected list because it is not contained in either an aggregate function or the GROUP BY clause."
Everything I've read about the SQL GROUP By says I can just group by one column after an aggregate function. What am I missing?
I've been trying to do a simple Group By in my DataSet query that returns the error:
Column "'KitWIP.DUE_DATE is invalid in the selected list because it is not contained in either an aggregate function or the GROUP BY clause."
Everything I've read about the SQL GROUP By says I can just group by one column after an aggregate function. What am I missing?
Code:
SELECT DUE_DATE, START_DATE, CUSTNO, SONO, COMPLETE, BLDQTY, ORD_TYPE, BALANCE, OPENCLOS, DESCRIPT, Expr1, PART_NO, WONO, REVISION, FabDue,
PartsDue, QuoteNo, MAX(PK_ProjSetup) AS LatestPK
FROM KitWIP
GROUP BY WONO