Rounding UP values

  • Hi,

    I need to round UP values but they should never be rounded down, below is my expected output in RoundVal column. Thanks!

    SELECT 89 AS Val, 100 AS RoundVal UNION ALL

    SELECT 329, 1000 UNION ALL

    SELECT 6329, 10000 UNION ALL

    SELECT 43299, 100000 UNION ALL

    SELECT 155329, 1000000

  • declare @t table (x int)

    insert into @t values (89),(329),(6329),(43299),(155329)

    select x, power(10,len(x)) from @t

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply