dbo.p_depavg--dbo为所有者名不正确

解决方案 »

  1.   

    还是不行
    应该是我写的程序有问题
    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
                         )
    这样写可以吗?
      

  2.   

    创建存储过程时所用的用户名不是dbo:
    用户名.p_depavg
      

  3.   

    要么不存在这个存储过程,要么所有者不对。
    调用:exec 用户名.p_depavg
      

  4.   

    你的SQL設置的問題,看看是了不是DBO
      

  5.   

    month(trans_date)<=month(@trans_date)and month(trans_date)>month(@lastqtr)
    这样写可以吗?