在前面还加上了这句是什么判断这个存储过程有还是没有吗? use buygoods1 go if object_id('dbo.GetOrderNum') is not null drop procedure dbo.GetOrderNum go
在前面还加上了这句是什么判断这个存储过程有还是没有吗? use buygoods1 go if object_id('dbo.GetOrderNum') is not null drop procedure dbo.GetOrderNum go 如果存在该存储过程就先删除。
如果程序调用此存储过程时,如果是"A"就执行 select item=count(*) from InGoods where vendor=@vendor and CKYEAR=@ckyear and CKMONTH=@ckmonth return如果程序调用此存储过程时,如果是"Y"就执行 select item=count(*) from InGoods where vendor=@vendor and CKYEAR=@ckyear and CKMONTH=@ckmonth and STATUS='OK' return
use buygoods1
go
if object_id('dbo.GetOrderNum') is not null
drop procedure dbo.GetOrderNum
go
use buygoods1
go
if object_id('dbo.GetOrderNum') is not null
drop procedure dbo.GetOrderNum
go
如果存在该存储过程就先删除。
select item=count(*) from InGoods where vendor=@vendor
and CKYEAR=@ckyear and CKMONTH=@ckmonth
return如果程序调用此存储过程时,如果是"Y"就执行
select item=count(*) from InGoods where vendor=@vendor
and CKYEAR=@ckyear and CKMONTH=@ckmonth and STATUS='OK'
return