Solved

How to use Group By in Datasets

Posted on 2006-11-20
4
187 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

16 Experts available now in Live!

Get 1:1 Help Now