本文共 886 字,大约阅读时间需要 2 分钟。
SQL> SELECT key,count,
DECODE (count, 1, (num+2)/3, 2, (num+1)/3, 3, num/count, num/count) avg FROM test /K COUNT AVG- ---------- ----------a 2 .9b 1 .9c 3 1d 4 1.5if exists(select count1 from bb1 where count1 >=3)
begin update bb1 set number = round( number/count1,1) end;else if exists(select count1 from bb1 where count1 =2) begin update bb1 set number =round((number+1)/3,1) end;else update bb1 set number = round((number+2)/3,1)decimal ld_standard,ld_ratio
dw_edit.AcceptText()if dwo.name = "standard" or dwo.name = "ratio" then ld_standard = round(dw_edit.GetItemDecimal(row,"standard"),4) ld_ratio = round(dw_edit.GetItemDecimal(row,"ratio"),4) dw_edit.SetItem(row,"ration",Round(ld_standard*ld_ratio,4))end ifreturn 1
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/219138/viewspace-918098/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/219138/viewspace-918098/