还是不行 应该是我写的程序有问题 select @da_cr_balance= ( select sum(amt*(@datenum-cast(datepart(dd,trans_date)as int)+1)) from t_journal where flag='1' and account_no=@account_no and year(trans_date)=year(@trans_date) and month(trans_date)=month(@trans_date) group by account_no ) 这样写可以吗?
应该是我写的程序有问题
select @da_cr_balance=
( select sum(amt*(@datenum-cast(datepart(dd,trans_date)as int)+1))
from t_journal
where flag='1' and account_no=@account_no and year(trans_date)=year(@trans_date) and month(trans_date)=month(@trans_date)
group by account_no
)
这样写可以吗?
用户名.p_depavg
调用:exec 用户名.p_depavg
这样写可以吗?