X
xywen
Unregistered / Unconfirmed
GUEST, unregistred user!
我写了如下SQL :
close;
sql.clear;
sql.Add('select letter.lmedia media,sum(rmemo.rtotalmoney) post from letter '
+' INNER JOIN rmemo ON (rmemo.rcode =letterer.lcode) '
+' where (rmemo.rdate>=_CalDP1) and (rmemo.rdate<=_CalDP2) group by media ');
parambyname('P_CalDP1').asdatetime:=CalDP1.Date;
parambyname('P_CalDP2').asdatetime:=CalDP2.Date;
open;
总是运行太慢,如果去调连接条件或查询条件就正常了
请高手会诊一下!