这个是还有错,能帮我看下吗?
with qrypd do
begin
close;
commandtext:='select PURCHASEID,state,price from DYE_INMAIN where state<>''审核'' or price is null and '
+'indate>=to_date('+SysUtils.QuotedStr(startdatetime)+',''yyyy-MM-dd HH24:MI:SS'') and '
+'indate<to_date('+SysUtils.QuotedStr(enddatetime)+',''yyyy-MM-dd HH24:MI:SS'') ';
open;
first;
while not eof do
begin
str:=str+fieldbyname('purchaseid').AsString;
next;
end;
dialogs.ShowMessage(str);
end; |