N nxyzg Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-21 #1 如何能不用sql 计算符合条例的记录个数及对某一字段求和?adotable
L LuJuhe Unregistered / Unconfirmed GUEST, unregistred user! 2002-06-21 #2 那就只有遍历数据集了: iCount := 0; iSum := 0; adotable.First; if (not adotable.eof) and (Your_condition) then begin inc(iCount); iSum := iSum + adotable.fieldbyname('yourfield').asinteger; adotable.next; end
那就只有遍历数据集了: iCount := 0; iSum := 0; adotable.First; if (not adotable.eof) and (Your_condition) then begin inc(iCount); iSum := iSum + adotable.fieldbyname('yourfield').asinteger; adotable.next; end