convert(numeric(10,2),数据)
格式化一下再比较。

解决方案 »

  1.   

    cast(数据 as numeric(10,2))
      

  2.   

    楼主在建库的时候如果想控制精度的话(小数点右边的位数)
    最好不要使用double 类型!
      

  3.   

    我在VB中也碰到了这样的问题,因为VB内置的ROUND对于DOUBLE数据类型的处理有可以得出不正确的结果!后来我做了个函数,解决问题.
    '自定义保留小数点位数函数
    '参数i表示待操作之数值
    '参数j表示保留小数点位数
    Public Function MyRound(i As Double, j As Integer) As Double
    On Error Resume NextDim s As String
    Dim k As Integers = "#."
    For k = 1 To j
        s = s & "#"
    NextMyRound = Format(i, s)End Function