导航
  • 主页
  • 基础类
  • 应用实例
  • 新技术前沿

存储过程错误、?

liao71 2003-12-07 09:21:16
commandtext does no reture a result set 是什么意思?
...全文
2 点赞 收藏 2
写回复
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
liao71 2003-12-07
use buygoods1
go
if object_id('dbo.InGoodsList') is not null
drop procedure dbo.InGoodsList
go
create procedure dbo.InGoodsList
@code char(2)=null,
@ckyear int=null,
@item int=null,
@condition varchar(30)=null
as
if(@code='A')
begin
select * From InGoods where CKYEAR=@ckyear order by item
return
end
if(@code='A0')
begin
select * From InGoods where CKYEAR=@ckyear and STATUS='NG' order by item
return
end
if(@code='A1')
begin
select * From InGoods where CKYEAR=@ckyear and STATUS='OK' order by item
return
end
if(@code='C')
begin
select * From InGoods where Customer=@condition and CKYEAR=@ckyear order by item
return
end
if(@code='C0')
begin
select * From InGoods where Customer=@condition and CKYEAR=@ckyear and STATUS='NG' order by item
return
end
if(@code='C1')
begin
select * From InGoods where Customer=@condition and CKYEAR=@ckyear and STATUS='OK' order by item
return
end
if(@code='V')
begin
select * from InGoods where vendor= @condition and CKYEAR=@ckyear order by item
return
end
if(@code='V0')
begin
select * from InGoods where vendor= @condition and CKYEAR=@ckyear and STATUS='NG' order by item
return
end
if(@code='V1')
begin
select * from InGoods where vendor= @condition and CKYEAR=@ckyear and STATUS='OK' order by item
return
end
if(@code='M')
begin
select * from InGoods where Model like @condition+'%' and CKYEAR=@ckyear order by item
return
end
if(@code='M0')
begin
select * from InGoods where Model like @condition+'%' and CKYEAR=@ckyear and STATUS='NG' order by item
return
end
if(@code='M1')
begin
select * from InGoods where Model like @condition+'%' and CKYEAR=@ckyear AND STATUS='OK' order by item
return
end
if(@code='D')
begin
select * from InGoods where DESCRIPTION like @condition+'%' and CKYEAR=@ckyear order by item
return
end
if(@code='D0')
begin
select * from InGoods where DESCRIPTION like @condition+'%' and CKYEAR=@ckyear and STATUS='NG' order by item
return
end
if(@code='D1')
begin
select * from InGoods where DESCRIPTION like @condition+'%' and CKYEAR=@ckyear and STATUS='OK' order by item
return
end
if(@code='R')
begin
select * from InGoods where RPNO=@condition and CKYEAR=@ckyear order by item
return
end
if(@code='R0')
begin
select * from InGoods where RPNO=@condition and CKYEAR=@ckyear and STATUS='NG' order by item
return
end
if(@code='R1')
begin
select * from InGoods where RPNO=@condition and CKYEAR=@ckyear and STATUS='OK' order by item
return
end
if(@code='X')
begin
select * from InGoods where insp_date like @condition+'%' order by item
return
end
if(@code='X0')
begin
select * from InGoods where insp_date like @condition+'%' and STATUS='NG' order by item
return
end
if(@code='X1')
begin
select * from InGoods where insp_date like @condition+'%' and STATUS='OK' order by item
return
end
if(@code='S')
begin
select * from InGoods where Source= @condition and CKYEAR=@ckyear order by item
return
end
if(@code='S0')
begin
select * from InGoods where Source= @condition and CKYEAR=@ckyear and STATUS='NG' order by item
return
end
if(@code='S1')
begin
select * from InGoods where Source= @condition and CKYEAR=@ckyear and STATUS='OK' order by item
return
end
go
回复
Rotaxe 2003-12-07
命令没有返回结果集。
把具体代码贴出来看一下
回复
发动态
发帖子
MS-SQL Server
创建于2007-09-28

3.2w+

社区成员

MS-SQL Server相关内容讨论专区
申请成为版主
社区公告
暂无公告