Con algo asi
Wfil=""
If ! Empty(par1d)
wfil= wfil + "and campo1 >= par1d "
Endif
If ! Empty(par1h)
wfil= wfil + "and campo1 >= par1h "
Endif
If ! Empty(par2d)
wfil= wfil + "and campo2 >= par2d "
Endif
If ! Empty(par2h)
wfil= wfil + "and campo2 >= par1h "
Endif
Select * from archivo where camp3="COBRADO" &wfil
Ivan Martinez von Halle
>>>-----Mensaje original-----
>>>De: publice...@googlegroups.com
>>>[mailto:publice...@googlegroups.com] En nombre de José
>>>Jiménez Zuryta
>>>Enviado el: Viernes, 15 de Octubre de 2010 04:37 p.m.
>>>Para: Comunidad de Visual Foxpro en Español
>>>Asunto: [vfp] Condicion demasiada larga en un select (error:
>>>Command contains unrecognized phrase/keyword)
>>>