bri189a Posted July 18, 2005 Posted July 18, 2005 Has anyone seen a good way to do the equivelant of a GROUP BY using a DataSet or DataView? Just curious because if I didn't have to go back to the database to get the same information, only grouped, it would save me a step. On that note, an equivelant to SELECT DISTINCT would be cool tool. Thanks. Quote
Machaira Posted July 19, 2005 Posted July 19, 2005 I don't understand the problem. Why wouldn't you do the SELECT DISTINCT or GROUP BY when populating the dataset? Or do you mean something else? Quote Here's what I'm up to.
bri189a Posted July 21, 2005 Author Posted July 21, 2005 I agree with that...totally. Just trying to see if it's possible to short cut writing another stored procedure (in-line SQL not an option). Didn't figure there was...more of a curiousity question than anything. Thanks. Quote
mandelbrot Posted July 21, 2005 Posted July 21, 2005 I've got to ask - why use a stored procedure and not a view, or even write the code directly into the program? Quote
bri189a Posted July 22, 2005 Author Posted July 22, 2005 I've got to ask - why use a stored procedure and not a view' date=' or even write the code directly into the program?[/quote'] How else would a view get to the application? Either a stored procedure or in line SQL in command object. Obviously if it's a query that's used often there will be a view since that would have the best performance, or I was using an AS400 where views are a pain in the butt to manage, update, and doesn't have any performance benifits from what we've seen, in which case I would stick with a stored procedure since it would be less trouble and has no performance impact. It was a curiosity question. Quote
mandelbrot Posted July 25, 2005 Posted July 25, 2005 Hi Bri - LOL! Don't take what I said the wrong way - it was more a direct question, than making a point. I'm learning myself, and presently am figuring out best practices, and am asking direct questions. I've only used triggers within SQL Server, so far, so everything I learn here is new. (Sorry if I offended!) Paul. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.