In your function, change the decimal accuracy of your return type. So, right now, I would expect the return type to be something like decimal(18,3)
. Which means 18 digits, three decimal places (to the right of the decimal). Instead, change your output to use the number of decimal places that you would prefer. For instance, if you would like zero, you could convert it to a bigint or decimal(18,0)
If you don't own the function, then you could cast the output after the function is called, but it doesn't look as nice
Cast([dbo].[CCS_DIGITAL_STORAGE_CONVERTER]('B', 'GB', Capacity) AS Decimal(18,0))