SQL get the value above(larger) and below(smaller) of an inbetween value in a select statement -
SQL get the value above(larger) and below(smaller) of an inbetween value in a select statement -
i have table containing 2 columns "allowable" , "thickness".
the thickness values allow 1.2 2 3 4,3 i'm trying write udf can take thickness (eg2.3) , interpolates allowable values. question if there smart (or maybe out of box) function returns upper , lower thickness value need (2 , 3). regards, lumpi i'm using ms sql server 2008..
select 'max', max(thickness) value thicknesses thickness < requirement union select 'min', min(thickness) value thicknesses thickness > requirement
sql select
Comments
Post a Comment