QueryCB.SQL.Add('SELECT SUM(Montant) '); QueryCB.SQL.Add('FROM DetailSkim '); QueryCB.SQL.Add('WHERE Caisse='''+CurrentCaisse+'''and Type=''CB'' and Date='''+FormatDateTime('mm/dd/yyyy', Principale.CurrentDate)+'''');
QueryCB.SQL.Add('SELECT SUM(Montant) '); QueryCB.SQL.Add('FROM DetailSkim '); QueryCB.SQL.Add('WHERE Caisse='+QuotedStr(CurrentCaisse)+' and Type=' + QuotedStr(CB) +' and Date='+QuotedStr(FormatDateTime('mm/dd/yyyy', Principale.CurrentDate)));
const Requete = 'Select sum(montant) from DetailSkim' +' where Caisse "%s" and type "%s" and date = "%s"'; begin QueryCB.Sql.Text := Format(Requete, [CurrentCaisse, CB, FormatDateTime('mm/dd/yyyy', Principale.CurrentDate)]); //reste du traitement ici end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question