多句sql整理成一句
时间:2011-12-08
来源:互联网
set rs=server.CreateObject("adodb.recordset") sql = "select ExamID from Exam_chapter_Test where chapterID="&chapterId&" " rs.open sql,Conn,1,3 do while not rs.eof count = Conn.execute("select count(*) from Exam_chapter_Test where ExamID="&rs(0)&" and chapterID<>"&chapterId&"")(0) if count=0 then Conn.execute("update Examda_News set DCourseID=0 where ExamID="&rs(0)&"") end if rs.movenext loop rs.close set rs = nothing
作者: qq80718915 发布时间: 2011-12-08
不过你中间的do while里面的,可以全长 if exits来合并
作者: fuxiyang 发布时间: 2011-12-08
作者: fredrickhu 发布时间: 2011-12-08
作者: HJ_daxian 发布时间: 2011-12-08
作者: ssp2009 发布时间: 2011-12-08
<% set rs=server.CreateObject("adodb.recordset") sql = "select ExamID from Exam_chapter_Test where chapterID="&chapterId&" " rs.open sql,Conn,1,3 do while not rs.eof Conn.execute("update Examda_News set DCourseID=0 where ExamID="& rs(0) &" and (select count(*) from Exam_chapter_Test where ExamID="&rs(0)&" and chapterID<>"&chapterId&")>0") rs.movenext loop rs.close set rs = nothing %>
作者: qianjin036a 发布时间: 2011-12-08
作者: qianjin036a 发布时间: 2011-12-08
作者: pengxuan 发布时间: 2011-12-08
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28