P
pcw
Unregistered / Unconfirmed
GUEST, unregistred user!
begin
ad.close;
ad.SQL.clear;
ad.SQL.add('select rq2,(select count(*) from bmry where bmry.cz=''A'') as ta,'); //datevalue(bmry.rq2) like '''+'%'+t1+'-'+t2+'%'' and
ad.SQL.add('(select count(*) from bmry where bmry.cz=''B'') as tb,');
ad.SQL.add('(select count(*) from bmry where bmry.cz=''C'') as tc,');
ad.SQL.add('(select count(*) from bmry where bmry.cz=''D'') as td,');
ad.SQL.add('(select count(*) from bmry where bmry.cz=''E'') as te,');
ad.SQL.add('(select count(*) from bmry where bmry.cz=''G'') as tg ');
ad.SQL.add('from bmry group by bmry.rq2');
ad.open;
end;
ad.close;
ad.SQL.clear;
ad.SQL.add('select rq2,(select count(*) from bmry where bmry.cz=''A'') as ta,'); //datevalue(bmry.rq2) like '''+'%'+t1+'-'+t2+'%'' and
ad.SQL.add('(select count(*) from bmry where bmry.cz=''B'') as tb,');
ad.SQL.add('(select count(*) from bmry where bmry.cz=''C'') as tc,');
ad.SQL.add('(select count(*) from bmry where bmry.cz=''D'') as td,');
ad.SQL.add('(select count(*) from bmry where bmry.cz=''E'') as te,');
ad.SQL.add('(select count(*) from bmry where bmry.cz=''G'') as tg ');
ad.SQL.add('from bmry group by bmry.rq2');
ad.open;
end;