关于SQL语句简写问题请教一下
各位好啊,我想问一下下面的语句该如何简写<%
if nowxiaoqu="" then
sql="select * from login order by xiaoqu,id"
else
sql="select * from login where xiaoqu="&nowxiaoqu&" order by id"
end if
set rs_login=conn.execute(sql)
do while rs_login.eof=false
if nowbumen="" then
sql="select * from login order by bumen,id"
else
sql="select * from login where bumen="&nowbumen&" order by id"
end if
set rs_login=conn.execute(sql)
do while rs_login.eof=false
%>