Código
Query1.Close;
QUery1.SQL.Clear;
QUery1.SQL.Add('select Sum(valor) as Total from nometabela');
QUery1.SQL.Add('where turma = "'+(turma.Text) + '"');
QUery1.Open;
Edit1.Text:= FormatFloat('##,###,##0.00',ADOQuery1Total.Value);
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009