代码之家  ›  专栏  ›  技术社区  ›  Nick

SQL列表函数删除精度

  •  0
  • Nick  · 技术社区  · 16 年前

    这是我的用法列表:

    LIST(case when tblWOService.PricePerVehicle is null then ' ' else CONVERT(decimal(19,2),tblWOService.PricePerVehicle end,';')
    

    转换不会更改结果。有什么想法吗?

    1 回复  |  直到 16 年前
        1
  •  1
  •   Harper Shelby damiankolasa    16 年前

    您是否尝试过显式转换空字符串?

    LIST(
        case when tblWOService.PricePerVehicle is null then CONVERT(decimal(19,2),' ')
            else CONVERT(decimal(19,2),tblWOService.PricePerVehicle) end,';'
    )