紧急求援:一个存储过程的输出参数传递给另外一个存储过程出语法错误。(100分)

  • 主题发起人 guilinlzy
  • 开始时间
G

guilinlzy

Unregistered / Unconfirmed
GUEST, unregistred user!
被调用的存储过程“GetNotesNumberofBill_Sp”,需要将它的输出传递给另外一个存储过程:
/*获取派车通知单包含派车通知数*/正确的
CREATE procedure GetNotesNumberofBill_Sp(
@AutoDispatchBill_Id nchar(3),
@return int output
) as
declare @notecount int
select @notecount = count(*) from TbAutoDispatchNote where
AutoDispatchNote_AutoDispatchBill_Id=@AutoDispatchBill_Id
select @return=@notecount
return
GO
----------
要调用上面存储过程的存储过程:
/*删除一条派车通知单记录,调用GetNotesNumberofBill_Sp*/
CREATE procedure DeleteBill_Sp(
@AutoDispatchBill_Id nchar(3),
@return nvarchar(50) output
) as
--调用上面的存储过程GetNotesNumberofBill_Sp
declear GetNotesNumberofBill_Sp( output @BillNumber int)//这里出语法错误
if (@BillNumber = 0)
begin
delete from TbAtuoDispatchBill where AutoDispatchBill_Id = @AutoDispatchBill_Id
select @return = 'S_OK'
return
end
if (@BillNumber > 0)
begin
select @return ='F_Bill_NotDeleteBill'
return
end
GO
请大家帮忙看看,谢谢。
 
说不清楚
 
上面没表述清楚吗?
应该很清楚了吧,:(
 
已经解决了,其实调用另外一个存储过程就跟执行该存储过程是一样的。
唉,就这么浪费了100大洋,还是自己解决了的,呜呜。
 
解决了就好
 
就是嘛,我说你怎么还加declear ,我还已为我这次又有的赚了
 
散分了。
 
顶部