Código:
if cate="2" or cate="1" then subin="SELECT * FROM not" elseif cate="3" or cate="1" then subia="SELECT * FROM acti" elseif cate="4" or cate="1" then subix="SELECT * FROM arti" end if if len(subin)>0 then strsqln = subin& " where UCase(tit) like '%" & UCase(Request("tit")) & "%' AND UCase(artic) like '%" & UCase(Request("artic")) & "%' AND UCase(tex) like '%" & UCase(Request("tex")) & "%' order by "& orden & " "&alf if len(subia)>0 then strsqla = subia& " where UCase(tit) like '%" & UCase(Request("tit")) & "%' AND UCase(artic) like '%" & UCase(Request("artic")) & "%' AND UCase(tex) like '%" & UCase(Request("tex")) & "%' order by "& orden & " "&alf if len(subix)>0 then strsqlx = subix& " where UCase(tit) like '%" & UCase(Request("tit")) & "%' AND UCase(artic) like '%" & UCase(Request("artic")) & "%' AND UCase(tex) like '%" & UCase(Request("tex")) & "%' order by "& orden & " "&alf if cate="1" then strsql=strsqln & " UNION " & strsqla & " UNION " & strsqlx elseif cate="2" then strsql=strsqln elseif cate="3" then strsql=strsqla else strsql=strsqlx end if