i have a datatable with a column of doubles.
how would i find the largest and smallest double in the column, and add the column? i dont want to loop through it... that's too easy:)
Printable View
i have a datatable with a column of doubles.
how would i find the largest and smallest double in the column, and add the column? i dont want to loop through it... that's too easy:)
Sort the column and then pick up the first and the last item.
will that affect the output when i apply it to a datagrid? i dont want it to be sorted in the output.
Well, if you're getting the list of values from a database table, could you not execute a second query such as...
...to get the calculations you're after?Code:SELECT MAX(dbo.Table1.Value), MIN(dbo.Table1.Value), SUM(dbo.Table1.Value) FROM dbo.Table1
i'm not using a database table. i'm populating the datatable using other calculations.
btw - i dont know what a database table is and how to use it either:rolleyes: