数据库中price(列)是 :123600
现要弄成:12.40万 或者 12.30万

解决方案 »

  1.   

    select ltrim(cast(price*10/10000/10.0 as dec(18,2)))+'万'
    from tb
      

  2.   

    select 123600.0/10000---------------------------------------
    12.3600000(1 行受影响)
      

  3.   

    select ltrim(cast(round(price/10000.0,1) as dec(18,2)))+'万' as price from [tb]
      

  4.   

    select ltrim(cast(round(price/10000.0,1) as dec(18,2)))+'万' as price from tb
      

  5.   

    ltrim(cast(round(price/10000.0,2) as dec(18,2))) as price