使用后 sql.add('select CustomerAccount.customername,' +'movehistory.accountid,' +'movehistory.SN,' +'movehistory.oddNO,' +'movehistory.goodsname,' +'movehistory.wmodel,' +'movehistory.movepiece,' +'movehistory.oldlocation,' +'movehistory.oldarea,' +'movehistory.worktime,' +'movehistory.affirmMen,' +'movehistory.remark' +' from movehistory left outer join CustomerAccount on ' +' movehistory.accountid=CustomerAccount.accountid ' +sqlstr+' order by accountid,sn');得出的文本为select CustomerAccount.customername,movehistory.accountid,movehistory.SN,movehistory.oddNO,movehistory.goodsname,movehistory.wmodel,movehistory.movepiece,movehistory.oldlocation,movehistory.oldarea,movehistory.worktime,movehistory.affirmMen,movehistory.remark from movehistory left outer join CustomerAccount on movehistory.accountid=CustomerAccount.accountid where (worktime between '2008-12-31 11:56:25' and '2009-12-31 11:56:25') order by accountid,sn出错信息为:列名accountid 不明确可是我在SQLserver2000里执行是可以的,大哥们速回