SELECT ISNULL(num,0)as num ,rTime FROM fpw WHERE rTime BETWEEN CONVERT(varchar(100), #{startDay}, 20) and CONVERT(varchar(100), #{endDay}, 20) and rFirm = #{firm} and rBumen =#{bumen} AND r.._sqlse">
赞
踩
<select id="getFpw" resultType="java.util.Map">
SELECT ISNULL(num,0)as num ,rTime FROM fpw WHERE rTime BETWEEN CONVERT(varchar(100), #{startDay}, 20) and CONVERT(varchar(100), #{endDay}, 20) and rFirm = #{firm} and rBumen =#{bumen} AND rZu = #{zu}
</select>
<select id="getFpwMonth" resultType="integer">
SELECT ISNULL(cast(SUM(num) as varchar),0) FROM fpw WHERE datediff(month,[rTime],#{Date})=0 and rFirm = #{firm} and rBumen =#{bumen} AND rZu = #{zu}
</select>
<select id="getFpwYear" resultType="integer">
SELECT ISNULL(cast(SUM(num) as varchar),0) FROM fpw WHERE datediff(year,[rTime],#{Date})=0 and rFirm = #{firm} and rBumen =#{bumen} AND rZu = #{zu}
</select>
数据库
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。