How to get this in decimal value instead of null

后端 未结 4 1943
萌比男神i
萌比男神i 2021-01-29 10:13

i am trying to get value in Decimal in this query but unable to get i am getting NULL Value

SELECT CAST(CAST(CAST(SUM(CAST(0 AS INT)) AS DECIMAL(10, 2)) * 100 
         


        
4条回答
  •  离开以前
    2021-01-29 10:40

    I don't even start to understand all the conversions that you are doing, but you can just simply use ISNULL on that expression:

    SELECT ISNULL(,0)
    

提交回复
热议问题