On Aug 21, 2:29*pm, "DaveL" <dvs_...@sbcglobal.netwrote:
somthing like the below
select min(somecolumn), max(SomeColumn) from sometable *(nolock)
where somecolumn >= somvalue and somecolumn <= somvalue
look at the Sql Between clause also
DaveL
"Dan" <D...@discussions.microsoft.comwrote in message
news:A8**********************************@microsof t.com...
I have a data set that I would like to get the min max for a column but
only
from a range of records ie the 20th thru the 33rd record. Could someone
point
me to some sytax to do this.
Thanks in advance - Dan
Sorry, could you elaborate on what you want to achieve?
If I understand correctly, you're trying to get the row that has the
minimum value for some column in a table, and the same thing for the
row that has the maximum value.
DaveL posted code to get the value from a SQL Server database, but you
have a dataset, so it's much different (and easier!)
I'll post some code ASAP.
Also, if you do it your own way, don't forget to cast the values to an
int, so that C# knows how to compare the values.