Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hello guys,I had a SQL database and i want it to show the total not the individual data. But i dont know how to do that in VB.net.Example database:LName Fname Date DataAramis Pietrus 01/02/2009 12Aramis Pietrus 01/03/2009 14Aramis Pietrus 01/04/2009 19Aramis Pietrus 01/05/2009 21I want it only the sum of data to show in the datagridviewLName Fname Date DataAramis Pietrus 01/02/2009 66
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2009-10-01 : 01:17:45
then bring only aggregates in query
SELECT Lname,FName,MIN(Date) AS Date,SUM(Data) AS DataFROM YourTableGROUP BY Lname,FName