好久没有碰到的技术问题, sql过程哪里错了?

fristfly 2006-06-03 02:00:29
CREATE PROCEDURE web_getprojectTopList
(
@Lottype int,
@Wtype int,
@expect varchar(20)
)
/*返回10条指定期号的足彩单式和买方案的未满员方案列表*/
AS
set nocount on
if @Lottype=1 --zc
begin
select top 10 sp_id id,Sp_proid proid,sp_username username,sp_isbaodi isbaodi,Sp_Aunum Aunum,sp_Agnum Agnum,Sp_Cunum Cunum,sp_allmoney allmoney,sp_anumber anumber,sp_onemoney onemoney,
sp_hnumber hnumber,dbo.get_mainmoney_zc(sp_id,sp_username,sp_onemoney) mainpaymoney,cast(sp_hnumber*100/sp_anumber as int) renqi ,Sp_clickstime clickstime,
sp_isshow isshow,(Sp_isreturn+Sp_userisreturn) isreturn,isnull(sp_fileorcode,'') fileorcode,sp_order setorder,Sp_isupload isupload ,(sp_aunum*10000+sp_agnum*100) zhanji ,sp_isthew isthew
from t_zcproject with(nolock) where Sp_expect=@expect and sp_wtype=@Wtype and sp_ishm=1 and Sp_isreturn=0 and Sp_userisreturn=0 order by sp_ismanyuan,sp_order desc,renqi desc,sp_allmoney desc,sp_id
--from t_zcproject where Sp_expect=@expect and sp_wtype=@Wtype and sp_ishm=1 and sp_ismanyuan=0 and Sp_isreturn=0 and Sp_userisreturn=0 order by Sp_isreturn, Sp_userisreturn,sp_order desc,renqi desc,sp_id
end
else if @Lottype=2 --进球采
begin
select top 10 jp_id id,jp_proid proid,jp_username username,jp_isbaodi isbaodi,jp_Aunum Aunum,jp_Agnum Agnum,jp_Cunum Cunum,jp_allmoney allmoney,jp_anumber anumber,jp_onemoney onemoney,
jp_hnumber hnumber,dbo.get_mainmoney_jq(jp_id,jp_username,jp_onemoney) mainpaymoney,cast(jp_hnumber*100/jp_anumber as int) renqi ,jp_clickstime clickstime,
jp_isshow isshow,(jp_isreturn+jp_userisreturn) isreturn,isnull(jp_fileorcode,'') fileorcode,jp_order setorder,jp_isupload isupload ,(jp_aunum*10000+jp_agnum*100) zhanji ,jp_isthew isthew
from t_jqproject with(nolock) where jp_expect=@expect and jp_wtype=@Wtype and jp_ishm=1 and jp_isreturn=0 and jp_userisreturn=0 order by jp_ismanyuan,jp_order desc,renqi desc,jp_allmoney desc,jp_id
--from t_jqproject where jp_expect=@expect and jp_wtype=@Wtype and jp_ishm=1 and jp_ismanyuan=0 and jp_isreturn=0 and jp_userisreturn=0 order by jp_isreturn, jp_userisreturn,jp_order desc,renqi desc,jp_id
end
else if @Lottype=3 --双色球
begin
select top 10 tp_id id,tp_proid proid,tp_username username,tp_isbaodi isbaodi,tp_Aunum Aunum,tp_Agnum Agnum,tp_Cunum Cunum,tp_allmoney allmoney,tp_anumber anumber,tp_onemoney onemoney,
tp_hnumber hnumber,dbo.get_mainmoney_ss(tp_id,tp_username,tp_onemoney) mainpaymoney,cast(tp_hnumber*100/tp_anumber as int) as renqi ,tp_clickstime clickstime,
tp_isshow isshow,(tp_isreturn+tp_userisreturn) isreturn,isnull(tp_fileorcode,'') as fileorcode,tp_order setorder,tp_isupload as isupload ,(tp_aunum*10000+tp_agnum*100) as zhanji ,tp_isthew isthew
from t_ssproject with(nolock) where tp_expect=@expect and tp_wtype=@Wtype and tp_ishm=1 and tp_isreturn=0 and tp_userisreturn=0 order by tp_ismanyuan,tp_order desc,renqi desc,tp_allmoney desc,tp_id
--from t_ssproject where tp_expect=@expect and tp_wtype=@Wtype and tp_ishm=1 and tp_ismanyuan=0 and tp_isreturn=0 and tp_userisreturn=0 order by tp_isreturn, tp_userisreturn,tp_order desc,renqi desc,tp_id
end
else if @Lottype=4 --七星
begin
select top 10 qp_id id,qp_proid proid,qp_username username,qp_isbaodi isbaodi,qp_Aunum Aunum,qp_Agnum Agnum,qp_Cunum Cunum,qp_allmoney allmoney,qp_anumber anumber,qp_onemoney onemoney,
qp_hnumber hnumber,dbo.get_mainmoney_qx(qp_id,qp_username,qp_onemoney) mainpaymoney,cast(qp_hnumber*100/qp_anumber as int) as renqi ,qp_clickstime clickstime,
qp_ismanyuan ismanyuan,(qp_isreturn+qp_userisreturn) isreturn,isnull(qp_fileorcode,'') as fileorcode,qp_order setorder,qp_isupload as isupload ,(qp_aunum*10000+qp_agnum*100) as zhanji ,qp_isthew isthew
from t_qxproject with(nolock) where qp_expect=@expect and qp_wtype=@Wtype and qp_ishm=1 and qp_isreturn+qp_userisreturn=0 order by qp_ismanyuan,qp_order desc,renqi desc,qp_allmoney desc,qp_id
--from t_qxproject where qp_expect=@expect and qp_wtype=@Wtype and qp_ishm=1 and qp_ismanyuan=0 and qp_isreturn+qp_userisreturn=0 order by qp_isreturn, qp_userisreturn,qp_order desc,renqi desc,qp_id
end
else if @Lottype=10 --广东篮彩
begin
select 1
end
GO
...全文
137 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
fristfly 2006-06-23
  • 打赏
  • 举报
回复
原因搞清楚了, 少了一个表
fristfly 2006-06-03
  • 打赏
  • 举报
回复
... 对呵, 是存贮过程出错, 如何改这一个存贮过程???????
moodboy1982 2006-06-03
  • 打赏
  • 举报
回复
汗,这么长。存贮过程出错
fristfly 2006-06-03
  • 打赏
  • 举报
回复
sql = "web_getprojectTopList 1,3,'06018'"
Rs.Open SQL,Conn,1,3
错误提示

Microsoft OLE DB Provider for SQL Server 错误 '80040e21'

多步 OLE DB 操作产生错误。如果可能,请检查每个 OLE DB 状态值。没有工作被完成。

/b_inc/Classes/Cls_Inc.asp,行 33

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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