Sunday, December 22, 2019

SQL SERVER - How to get min/max value from more values

declare @ra_min float = ( select min(x) from ( values ( @ra_from ), ( @ra_to ) ) as n(x) );
declare @ra_max float = ( select max(x) from ( values ( @ra_from ), ( @ra_to ) ) as n(x) );

No comments:

Post a Comment