Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27368

VS 2012 DataSet SQL GROUP By statement not working

$
0
0
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?

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


Viewing all articles
Browse latest Browse all 27368

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>