Tema: like '1*'
Ver Mensaje Individual
  #4  
Antiguo 09-02-2004
__cadetill __cadetill is offline
Miembro
 
Registrado: may 2003
Posts: 3.387
Reputación: 25
__cadetill Va por buen camino
Solo añadir que, las comillas son 3 o 4 dependiendo de como se haga. Es decir, si lo haces como propone Novás son 4, pero si lo haces como propone Javier son 3. No obtante, para no liarse yo prefiero utilizar el QuotedStr o parámetros en la Query

Con QuotedStr quedaría algo así
Código:
sql := 'Select * from Productos where RefInterna like ' + QuotedStr(TxtPatron.Text + '%');
Con Parámetros quedaría algo así
Código:
Query.Sql.Text := 'Select * from Productos where RefInterna like :Texto';
Query.ParamByName('Texto').AsString := TxtPatron.Text + '%';
Responder Con Cita