Ver Mensaje Individual
  #28 (permalink)  
Antiguo 01/10/2010, 11:59
junnior
 
Fecha de Ingreso: julio-2007
Mensajes: 58
Antigüedad: 16 años, 10 meses
Puntos: 0
Respuesta: Busqueda Multiple en .asp

esta bien con esto podemos revisar los errores ...y es ovbio que tenemos uno granade y es en la sentencia

select * from Plans WHERE Pool LIKE '%PSO%' WHERE Status LIKE '%ON GOING%' WHERE Status LIKE '%ON GOING%' and Pool LIKE '%PSO%'

si te fijas esta mal


cambia la estructura.

sql = " select * from Plans "

If(poo <>"" and sta <>"") then
sql2 = sql2 & " WHERE Status LIKE '%" & sta & "%' and Pool LIKE '%" & poo & "%' "
end if

If(poo <>"") then
sql2 = sql2 & " WHERE Pool LIKE '%" & poo & "%' "
end if

If(sta <>"") then
sql2 = sql2 & " WHERE Status LIKE '%" & sta & "%' "
end if