首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

iBATIS 您懂的

2013-11-23 
iBATIS你懂的異常信息:--- The error occurred while applying a parameter map.--- Check the production

iBATIS 你懂的
異常信息:
--- The error occurred while applying a parameter map.  
--- Check the productionMasterPlan.getStartweek-InlineParameterMap.  
--- Check the statement (query failed).  
--- Cause: java.sql.SQLException: ORA-00911: 无效字符 

<select id="getStartweek" parameterClass="String"  resultClass="String">
select  decode(tt.D,to_char('sunday'),tt.W,tt.w+1) from 
(with t as(select to_date(to_char('2010/10/01'),'YYYY/MM/DD')+level-1 dt from dual connect by level &lt;=31)
select dt,to_char(dt,'ww')w,trim(to_char(dt,'day')) d from t) tt where rowNum=1;
</select>
那個時間是參數
在toad裏面能正常執行
[解决办法]
LZ试试这样呢:to_char(#时间参数#),'YYYY/MM/DD')
[解决办法]
如果时间是字符类型的,就不要在用to_char了,直接to_date
to_date(to_char('2010/10/01'),'YYYY/MM/DD')
改为:
to_date('2010/10/01','YYYY/MM/DD')

热点排行