Solved

How to use Group By in Datasets

Posted on 2006-11-20
4
188 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

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

Suggested Solutions

Title # Comments Views Activity
Achieve json result 2 65
How to avoid saving tif files a 2nd time using VS2015 and C#? 1 27
DateTimepicker 4 33
Reset asp.net login password 4 28
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.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

912 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

17 Experts available now in Live!

Get 1:1 Help Now