H
heyang6257
Unregistered / Unconfirmed
GUEST, unregistred user!
with ADOQuery2 do begin close; sql.Clear; sql.add('select * from Card_CG_Contract_MXB a where a.Col2,a.Col3,a.Col4,a.Col5,a.CardcontractID '); sql.add('in (select Col2,Col3,Col4,Col5,CardcontractID from Card_CG_Contract_MXB '); sql.Add('where CardcontractID='''+DBGridhead.DataSource.DataSet.fieldbyname('ID').AsString+''''); sql.add('group by Col2,Col3,Col4,Col5,CardcontractID having count(*)>1)'); open; end;麻烦大家帮忙看下着段怎么执行出错啊。。。