select count(*) 嵌套计算的问题

ko871028 2009-11-17 04:35:39
intMark =G_CONN.execute("select count(*) as recmark from prj_process P_P,subject "_
& "S where P_P.answer=S.answer and P_P.prjid=" & intPrjID & " and P_P.studentid=" _
& intStudentID & " and P_P.subid=S.id and S.type=1")("recmark")

代码就是这样的,但是现在我要做的是个计算,这里只实现了统计一种题型数目的功能,还有段
select ss_avmark from project P_J,prj_process P_P where P_J.prjid=P_P.prjid

是读出相应的题型的每个题目的分数,我要的结果是两个相乘的积(即为该题型的得分),我试了在 count(*) *后面直接写出第二行代码但是不行,哪位朋友帮帮忙,小弟才学这个。
...全文
73 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
up1325 2009-11-17
  • 打赏
  • 举报
回复
CONN.execute("select count(*)*(select ss_avmark from project where prjid=" & intPrjID & " ) as recmark from prj_process P_P,subject "_
& "S where P_P.answer=S.answer and P_P.prjid=" & intPrjID & " and P_P.studentid=" _
& intStudentID & " and P_P.subid=S.id and S.type=1")("recmark")
braveboy 2009-11-17
  • 打赏
  • 举报
回复
没明白你说的意思
你是想让两给得出的结果进相*?

28,391

社区成员

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

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