请问一下 下面的这个错误,怎么解释呀?是我的sql有问题?还是数据库有问题的?
project project2.exe raised exception class edbengineerror with
message 'general sql error.ORA-00936:缺少表达式.process stopped.use step or run to continue
project project2.exe raised exception class edbengineerror with
message 'general sql error.ORA-00936:缺少表达式.process stopped.use step or run to continue
别的语句有没有出错过?
'select equipment.chrequipment ,testrecord.intave,testrecord.dttest from testrecord,equipment where equipment.chrequipment in ['+sb+'] and testrecord.idequipment=equipment.idequipment and testrecord.dttest>datetime1 and testrecord.dttest<datetime2 order by testrecord.dttest'
from testrecord a,equipment b
不就一清二楚了么?
试试:
'select equipment.chrequipment ,testrecord.intave,testrecord.dttest from testrecord,equipment where equipment.chrequipment in ('+sb+') and testrecord.idequipment=equipment.idequipment and testrecord.dttest>datetime1 and testrecord.dttest<datetime2 order by testrecord.dttest'
and testrecord.dttest>:datetime1 and testrecord.dttest<:datetime2 order by testrecord.dttest'
adoquery1.paramters.parambyname('datetime1').value := datetime1;
adoquery1.paramters.parambyname('datetime2').value := datetime2;