close;
        sql.clear;
        sql.add('select * into TMPTABEL from xgfh,xgth,xgjs ');
        sql.add(' where fhdate>='''+formatdatetime('yyyy-mm-dd',DateTimePicker1.date)+''''+
              ' and fhdate<='''+formatdatetime('yyyy-mm-dd',DateTimePicker2.date)+'''');
        sql.add(' and (xgfh.fhdate<>xgth.fhdate or xgfh.fhdate<>xgjs.fhdate)');
        sql.add(' and (xgfh.dw<>xgth.dw or xgfh.dw<>xgjs.dw)');
        sql.add(' and (xgfh.code<>xgth.code or xgfh.code<>xgjs.codes)');
        execsql; 这个语句是错的。我因怎么改??