/*计算售出金额*/
select @sold_jine=isnull(sum(piaojia),0) from soldticket where year(operatetime)=@year1 and month(operatetime)=mmm and spyid=@gonghao
/*计算合计金额*/
-->
/*计算售出金额*/
select @sold_jine=isnull(sum(piaojia),0) from soldticket where year(operatetime)=@year1 and month(operatetime)=@mmm and spyid=@gonghao
/*计算合计金额*/
select @sold_jine=isnull(sum(piaojia),0) from soldticket where year(operatetime)=@year1 and month(operatetime)=mmm and spyid=@gonghao
/*计算合计金额*/
-->
/*计算售出金额*/
select @sold_jine=isnull(sum(piaojia),0) from soldticket where year(operatetime)=@year1 and month(operatetime)=@mmm and spyid=@gonghao
/*计算合计金额*/
select @sold_heji=isnull(sum(piaojia_source),0) from soldticket where year(operatetime)=@year1 and month(operatetime)=mmm and spyid=@gonghao
/*计算折扣金额*/
-->
/*计算合计金额*/
select @sold_heji=isnull(sum(piaojia_source),0) from soldticket where year(operatetime)=@year1 and month(operatetime)=@mmm and spyid=@gonghao
/*计算折扣金额*/
select @sold_jine=isnull(sum(piaojia),0) from soldticket where year(operatetime)=@year1 and month(operatetime)=mmm and spyid=@gonghao
/*计算合计金额*/ ......@mmm
select @sold_heji=isnull(sum(piaojia_source),0) from soldticket where year(operatetime)=@year1 and month(operatetime)=mmm and spyid=@gonghao
/*计算折扣金额*/ ......@mmm有两处mmm少@