Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/09/2007, 14:07
Avatar de u_goldman
u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 23 años, 4 meses
Puntos: 98
Re: Ayuda Con Arreglos Y Sql

Bueno, no se exactamente los tipos de datos que manejas y demas pues veo que tienes operadores LIKE, regularmente estas consultas dinamicas las deberias de manejar divididas para vencerlas

Código:
argCount = 0
qry = "SELECT campo FROM tabla"

if len(opcion(1)) > 0 then
  if argCount = 0 then
     qry = qry & " WHERE "
  else
     qry = qry & " OR "
  end if
   qry = qry & " (tamano LIKE '%mi%' or tamano LIKE '%ni%') "
  argCount = argCount + 1
end if

if len(opcion(2)) > 0 then
  if argCount = 0 then
     qry = qry & " WHERE "
  else
     qry = qry & " OR "
  end if
   qry = qry & " (tamano LIKE '%pe%')"
  argCount = argCount + 1
end if

etc..
Saludos
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway