帮忙看一下这个存储过程为什么调用时报不能返回数据集。

xaojancsdn 2004-03-08 07:22:55
CREATE procedure ReportzhuxueJinFx
@Nj varchar(20),
@bj varchar(30)
As
declare @sNum int
Declare @sqNum int
declare @sPnum int
Begin
select @sNum=count(*) From xs_Xuesheng where nj=@Nj and Bj=@Bj

IF @sNum>0
begin
select @sqNum=Count(*) From xs_zhuxueje where nj=@nj and Bj=@bj

IF @sqNum>0
begin
select @spNum=Count(*) From xs_zhuxueje where nj=@nj and Bj=@bj and spdate=Null and spr=Null

select max(@nj) as 年级,max(@bj) as 班级,@sNum as 班级总人数,@sqNum as 审请人助学金人数,@sqNum/@sNum*100 as
审请比例, @spNum/@sQnum*100 as 审批比例 From xs_zhuxueJe
end

End
end
GO
...全文
35 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复

2,496

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧