Solved

How to use Group By in Datasets

Posted on 2006-11-20
4
189 Views
Last Modified: 2010-04-16
I would like to know how I can perform an equivalent search using datasets (i.e. how can I get the same result as using sql?)


SELECT ColumnA, sum( ColumnB )
FROM table
GROUP BY ColumnA
0
Comment
Question by:fred2k3
  • 3
4 Comments
 
LVL 29

Accepted Solution

by:
Nightman earned 250 total points
ID: 17980171
you can't get the same results as SQL with a simple statement. However, there are other (more complex) ways to do it.

Have a look at http://support.microsoft.com/kb/326145
0
 
LVL 29

Expert Comment

by:Nightman
ID: 18005847
Hi Fred
I am glad that I was able to help you, but I don't understand why you gave me such a low grade. A C is the lowest grade you can give. Please can you explain this.

Also, please see http://www.experts-exchange.com/help.jsp#hi73 - "What's the right grade to give".
0
 

Author Comment

by:fred2k3
ID: 18006166
In all honestly I didn't feel that you put a lot of effort into explaining the solution since you just posted a link to a site which explained the answer (though not clearly). Having read the guide however, it suggests that a B would have been a more suitable grade.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 18006208
Fair enough - you can post a question in Community Support to open the question so you can adjust the grade, or wait for the Mods to review this one (I have already posted there) ;)

Usually you will find that when someone posts a long technical link like that it is because it is a good link with lot's of detailed information. Because we already assume a strong base understanding from the asker (especially in an area like C#), we expect that if there are any technical questions on specific points in the link (and with this one there could be dozens) that the asker will ask a specific question on implementation, where we can assist.

Some of us have already done this, and have found (after trial and error) a solution that works well. Usually these links are in our archives/favourites - not only are you getting a filtered, targeted Google result, but the potential for an explanation of the code and assistence with implementation.

Of course this doesn't always apply - there are some posters on this site (not all posters are really experts!) that simply use Google for solutions they don't understand themselves. You will have to evaluate these answers for yourself and decide whether the 'expert' answer deserves anything better than a B. C is usually 'that was a terrible answer!'.

At the same time, 'No, you can't do that' is also an answer, and sometimes a good one and deserves an A (see your question http://www.experts-exchange.com/Databases/Mysql/Q_22065618.html) - just because it's not what you want to hear doesn't mean it's wrong.

I hope this explains a bit more - and I also hope that I don't sound like I was lecturing (not the intention, I just want to clarify).

Cheers
Night
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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