sql查询百分比问题
sql2000select ((select count(OL_NBR)*1.0 from sqljh where jh_note!='')/(select count(OL_NBR) from sqljh))*100
查出来是.002837885700
我想显示%百分比形式 --------------------编程问答-------------------- select ltrim(((select count(OL_NBR)*1.0 from sqljh where jh_note!='')/(select count(OL_NBR) from sqljh))*100)+'%' --------------------编程问答-------------------- select ((select count(*) from 表名 where 工资 between 1000 and 1500 )*100/(select count(*) from 表名))
你可以在遍历数据的时候随你显示 --------------------编程问答-------------------- 可以用字符串函数去拼接嘛 --------------------编程问答-------------------- *100要放在前面而不是后面
补充:.NET技术 , ASP.NET