首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

嵌套查询语句怎样写,该怎么处理

2012-03-13 
嵌套查询语句怎样写要做一个查询模块,查询小学、中学的男女生考试成绩月报、年报。有三个可选条件:1.小学、中

嵌套查询语句怎样写
要做一个查询模块,查询小学、中学的男女生考试成绩月报、年报。有三个可选条件:1.小学、中学,2.男生、女生,3.月报、年报。我写了一个,但运行报错,请帮忙解决,谢谢!
if sdszb="0.小学" then 
  if xs="0.男生" then 
  if bblx="0.月报" then 
  ls_sql =""
  elseif bblx="1.年报" then  
  ls_sql =""
  end if  
  elseif xs="1.女生" then
  if bblx="0.月报" then 
  ls_sql =" "
  elseif bblx="1.年报" then  
  ls_sql =""
  end if  
  end if  
  elseif sdszb="1.中学" then  
  if xs="0.男生" then 
  if bblx="0.月报" then 
  ls_sql ="" 
  elseif bblx="1.年报" then  
  ls_sql =""
  end if  
  elseif xs="1.女生" then
  if bblx="0.月报" then 
  ls_sql =""
  elseif bblx="1.年报" then  
  ls_sql =""
 end if
  end if  
end if

[解决办法]

探讨
要做一个查询模块,查询小学、中学的男女生考试成绩月报、年报。有三个可选条件:1.小学、中学,2.男生、女生,3.月报、年报。我写了一个,但运行报错,请帮忙解决,谢谢!
if sdszb="0.小学" then
if xs="0.男生" then
if bblx="0.月报" then
ls_sql =""
elseif bblx="1.年报" then
l……

热点排行