select case t when 0 then 0 else a/t end,case t when 0 then 0 else b/t end....

解决方案 »

  1.   

    SELECT op.OutNo,op.OrderNo,op.ProductNo,Rtrim(p.strProductName) AS strProductName,p.strUnit,p.FloInLength,p.FloInWidth,
    p.FloInHeight,p.fAgio,pt.strtypedesc,pt.intPackRatein,pt.intPackRateMid,pt.intPackRateOut,o.PackType,
    (isnull(o.sl,0)/pt.intPackRatein)as inBox,
    (isnull(o.sl,0)/pt.intPackRatemidas midBox,
    (isnull(o.sl,0)/pt.intPackRateOut)as outBox以上是一部分代码,主要问题在除数为0时的问题