procedure TfDoorLogReport.bQueryClick(Sender: TObject);
begin
    with Table do
    begin
        SQL.Clear;
        SQL.Add('select (select Name from Users where ID =(select UserID from Card where ID=DoorLog.CardID))as UserName,');
        SQL.Add('(select Name from Door where ID=DoorID)as DoorName,CardID,OperateTime from DoorLog where Operate in (8,9)'+' ');
//        SQL.Add(' and OperateTime between '''+FormatDateTime('yyyy-MM-dd', dBeginDate.Date)+''' and '''+FormatDateTime('yyyy-MM-dd', dEndDate.Date)+'''');
        Open;    end;
end;
上面代码中被引掉的语句有问题,提示为‘标准表达式中类型不匹配’,请问问题出在哪呢?谢谢,在线等