请帮我看看这段代码有什么问题,提示查询语句出错。

<%
set rs=server.CreateObject("ADODB.Recordset")
dim temp ,I
dim posid,posname, branch, manager, checktime,bz,mainpic,checkpic,checkquarter,group
temp=request.Form("input")
select case request.Form("search")
if session("group")="兴化" then
case 0 sql="select * from check where group='兴化' and posid like '%"&temp&"%' order by checktime asc"
case 1 sql="select * from check where group='兴化' and posname like '%"&temp&"%' order by checktime asc"
end if
if session("group")="泰州" then
case 0 sql="select * from check where posid like '%"&temp&"%' order by checktime asc"

case 1 sql="select * from check where posname like '%"&temp&"%' order by checktime asc"
end if

end select
Rs.open sql, conn,1,1

if temp="" then

response.write "&quot; &amp; chr(13) &amp; &quot;alert(&#39;请输入检索条件!&#39;);&quot; &amp; &quot;history.back()&quot; &amp; &quot;"
end if
if rs.EOF then
response.write "

没有找到相关信息!

"
response.end
end if
%>

from后面没有写表名

 if session("group")="兴化" then
case 0 sql="select * from 这里没有写表名 where group='兴化' and posid like '%"&temp&"%' order by checktime asc" 
case 1 sql="select * from 这里没有写表名 where group='兴化' and posname like '%"&temp&"%' order by checktime asc"
end if 

发问题的时候贴漏了,提示“缺少语句”运行环境是ASP

看着一个等号,就会想到就赋值
看到两个等号,才会想到判断
不知道在这里是不是也这样