select
convert(numeric(16,2),(
round(convert(numeric(16,2),(replace([col1],',',''))),2)
/
case when (round(convert(numeric(16,2),(replace([col2],',',''))),2))
=0 then 0.000001
else (round(convert(numeric(16,2),(replace([col2],',',''))),2)) end
))
from [tab1]
转载于:https://my.oschina.net/TOW/blog/605707