A 為:Decimal(18,6) 
59.1499569  = 59.1
25.34999394 =25.3 
49.49997474 =49.5

解决方案 »

  1.   

    select str('59.1499569',4,1)
    select str('25.34999394',4,1)
    select str('49.49997474',4,1)
      

  2.   

    declare @int as decimal(18,6)
    set @int=59.1499569
    set @int =49.49997474 
    select  convert(decimal(18,1),@int)
      

  3.   

    1楼的: select ltrim(str('9.23423',4,1))
      

  4.   


    select round(49.49997474  ,1,0)
      

  5.   

    select @num=(round(444449.49997474,1,0))
    select @count=charindex('.','@num')+2
    select substring('@num',0,@count)结果是444449.5,后边没有多余的0
      

  6.   

    declare @Int decimal(18,4)
    set @Int=5.39
    select cast(round(@Int,1,0) as decimal(18,1))
      

  7.   


    创建函数
    Create Function dbo.GetValue(@Int deciaml(18,6))
    returns decimal(18,1)
    begin
      Return(cast(round(@Int,1,0) as decimal(18,1)))
    end执行
    select dbo.GetValue(59.1499569) 
    select dbo.GetValue(25.34999394)
    select dbo.GetValue(49.49997474)
    不过这么简单,函数好象没有必要,呵呵