Ver Mensaje Individual
  #3  
Antiguo 02-06-2011
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 29
Lepe Va por buen camino
Yo he entendido algo distinto, así que tú alclararás lo que querías preguntar.

Si tienes una claúsula where donde quieres usar el p.Cant por ejemplo, no usas el quotedStr y listo. Si quieres que sea un integer (no le añadas decimales) y si quieres el motor lo identifique como float, pues le añades el ".0" al final.

el código con Cant como integer y PU como float (para tener los dos ejemplos):
Código Delphi [-]
   qryDetalleValeConsumo.Close;
  qryDetalleValeConsumo.SQL.Text := 'Select D.Tdc, D.Doc, D.KOD, P.Descl, D.Cant, D.PU, D.Pt ' +
            'from (tblConsumoD D ' +
            'Left Join tblArticulo P on D.KOD = P.KOD) ' +
            'Where D.TDC = ' + QuotedStr(qryConsultaValesConsumoTdc.Value) +
            ' and D.DOC = ' + QuotedStr(qryConsultaValesConsumoDOC.Value) 
+         ' and D.Cant = ' + IntTostr(VariableIntegerCant) 
+         ' and D.PU = ' + FloatToStr(Variablefloat)
+
            ' Order by D.Tdc, D.Doc ';
  qryDetalleValeConsumo.Open;


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