DataSet/DataView question

bri189a

Well-known member
Joined
Sep 11, 2003
Messages
1,004
Location
VA
Has anyone seen a good way to do the equivelant of a GROUP BY using a DataSet or DataView? Just curious because if I didnt 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.
 
I dont understand the problem. Why wouldnt you do the SELECT DISTINCT or GROUP BY when populating the dataset? Or do you mean something else?
 
I agree with that...totally.

Just trying to see if its possible to short cut writing another stored procedure (in-line SQL not an option). Didnt figure there was...more of a curiousity question than anything.

Thanks.
 
mandelbrot said:
Ive got to ask - why use a stored procedure and not a view, or even write the code directly into the program?
How else would a view get to the application? Either a stored procedure or in line SQL in command object.

Obviously if its a query thats 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 doesnt have any performance benifits from what weve 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.
 
Hi Bri - LOL! Dont take what I said the wrong way - it was more a direct question, than making a point. Im learning myself, and presently am figuring out best practices, and am asking direct questions.

Ive only used triggers within SQL Server, so far, so everything I learn here is new.

(Sorry if I offended!)


Paul.
 
Back
Top