Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

MS SQL help

$
0
0

I have this bit of T-SQL code. Can anyone tell me what the "VALUE_DATE_OFFSET_NO,-20" and "VALUE_DATE_OFFSET_NO,20" gives me?
No comments in the code. What is this trying to achieve?
Is it saying to subtract 20 from the column and add 20 to the column for the declared variables?

DECLARE @MinCapacityOffset INT
DECLARE @MaxCapacityOffset INT


-- Look up the minimum and maximum offsets specified in the Capacity standards table.
SELECT  @MinCapacityOffset = MIN(ISNULL(TCAPACITY.VALUE_DATE_OFFSET_NO,-20)),
      @MaxCapacityOffset = MAX(ISNULL(TCAPACITY.VALUE_DATE_OFFSET_NO,20))
FROM  TCAPACITY


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>