W westboy2000 Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-28 #2 select max(字段名) from 表 where 条件
S syq_2000 Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-28 #3 我的问题是在ClientDataSet中查找某一字段的最大值的记录行
S sanwen Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-10 #5 select * from 表 A where field=(select max(field) as field from 表 B)
B BlueWin Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-11 #8 with qry do begin first; iMax:=fieldbyname('Fld').asInteger; while not eof do begin Filter:='fld > '+inttostr(iMax); Filtered:=true; if not eof then iMax:=fieldbyname('Fld').asInteger; end; filtered:=false; end; result:=iMax;
with qry do begin first; iMax:=fieldbyname('Fld').asInteger; while not eof do begin Filter:='fld > '+inttostr(iMax); Filtered:=true; if not eof then iMax:=fieldbyname('Fld').asInteger; end; filtered:=false; end; result:=iMax;