SQLTeam.com | Weblogs | Forums

Get max value from datareader results

Is there a way to get the largest value in one of my columns returned from the datareader AFTER the records have been returned? I know I can iterate thru the records but I am looking for a faster way. I also know I can modify the SQL script but I am looking for a way to do this in my code on vb.net and not have to modify the sql script. If there is a way then please provide an example.


post your sql script and table definition and include what column name you want the max val for