declare @i int--定义输出值类型
exec  proc_test  @x=A1101,@y= '2006-2-5 ',@z= '2008-2-5 ' ,@i output
select @i--查看结果

解决方案 »

  1.   

    这样执行之后每次输出的都是一个值,je的总值,@x限制的没有作用
      

  2.   

    @x has no use in the procedure.
      

  3.   

    what is @x=A1101 or 'A1101', whatever? 
      

  4.   

    create  proc  proc_test
    @x nvarchar(50),@y datetime,@z datetime,@m money output
    as
    select @m=sum(je) from a where ckrq between @y and @z and @x=ksbm group by ksbm 
    godeclare @m money
    exec  proc_test A1101,'2006-2-5','2008-2-5',@m output
    select @m搞定