Solved

VB.net Select SUM query

Posted on 2008-10-01
2
783 Views
Last Modified: 2008-10-03
Good Day

Experts:

I am fairly certain what I want to accomplish but I am not certain how to set it up.  

I have a Table where several  records might have duplicate ItemName values.  When that happens, I want to add up all of the corresponding Qty values on the records.  Here is my effort at a query to do this:
select ItemName, Sum(Qty) as 'Summed Qty' from ITEM group by ItemName

Is this the best way to achieve my needed result?

Thanks,
jimbo99999
 
0
Comment
Question by:Jimbo99999
2 Comments
 
LVL 13

Accepted Solution

by:
TechTiger007 earned 125 total points
ID: 22617980
That is the correct way :)
0
 

Author Comment

by:Jimbo99999
ID: 22634882
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now