iBATIS sql语句怎么写
SELECTdataId,tm,valueFROMdbo.spanData_HisWHEREdataID=11283AND(tmbetween'2008-07-0716:...
SELECT dataId,tm,value FROM dbo.spanData_His WHERE dataID =11283
AND (tm between '2008-07-07 16:00:00' AND '2008-07-10 16:00:00'
or tm between '2009-07-07 16:00:00' AND '2009-07-10 16:00:00'
or tm between '2010-07-07 16:00:00' AND '2010-07-10 16:00:00')
and spanId=1 ORDER BY dataID ASC ,tm ASC
如上语句如何在iBATIS配置中写,并且tm这个时间字段是不固定的,或许有一个,2个...,也许一个都没有! 展开
AND (tm between '2008-07-07 16:00:00' AND '2008-07-10 16:00:00'
or tm between '2009-07-07 16:00:00' AND '2009-07-10 16:00:00'
or tm between '2010-07-07 16:00:00' AND '2010-07-10 16:00:00')
and spanId=1 ORDER BY dataID ASC ,tm ASC
如上语句如何在iBATIS配置中写,并且tm这个时间字段是不固定的,或许有一个,2个...,也许一个都没有! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询