ASP中可以这样写吗??
strsql="select * from xsb (学生表)where xsxh(学生学号)='" & 获取学号 & "'"
str="select szbj(班级) from 成绩表 where xsxh=in " & strsql
rs.open str,db,1
我想在一个表中资料表中,找到学生的学号,然后用这些学号到,成绩表中,找到这些符合这些学号的学生所在的班级。上面这样写可以吗?
问题点数:0、回复次数:4Top
1 楼zorou_fatal(The world and system is even)回复于 2003-11-01 00:40:19 得分 0
select distinct szbj from 成绩表 where xsxh in (select * from xsb (学生表)where xsxh(学生学号)='" & 获取学号 & "'")
这样写Top
2 楼2320475(清风e栈)回复于 2003-11-01 01:03:08 得分 0
strsql="select szbj from xscj where xsxh in (select xsxh from xsb where xsxm='" & request("xxcx") & "'")"
这样吗?我好像没写对Top
3 楼stonepeter(笨笨石头.NET_从公务员转身成为了程序员)回复于 2003-11-01 08:32:07 得分 0
xsxm like'" & trim(request("xxcx")) & "'")"
试一下
Top
4 楼Tal(Tal)回复于 2003-11-01 09:03:32 得分 0
str="select b.szbj from 成绩表 as b where b.xsxh=in (select a.xsxh from xsb as a where a.xsxh='" & 获取学号 & "')"Top




