Ver Mensaje Individual
  #6  
Antiguo 19-10-2005
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 31
Lepe Va por buen camino
Otra más:

Código Delphi [-]
const genericSelect = 'select %s FROM %s where %s order by %s'
var OrderBy:string;

begin
 OrderBy := 'codigo';
  qry.Sql.text := format( genericSelect,
                                 ['Nombre, codigo',
                                 table1.tablename,
                                 'codigo = 5',
                                 OrderBy]);


saludos.
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita