在存储过程中这句:
select sDateTime from t_TableName where EntityID='123' and trunc(to_number(substr(sDateTime,11,2))/15=1)字段sDateTime是varchar类型,编译后提示:
Warning(30,188): PLW-07204: 从列类型转换为其它类型可能会产生子优化查询计划问:
1、这个警告有什么影响?
2、如何消除这个警告?oracle PLW-07204

解决方案 »

  1.   

    括号位置不对吧?觉得应该是这样trunc(to_number(substr(sDateTime,11,2))/15)=1
      

  2.   

    我也很好奇,楼主居然会报这个错误,而不是报‘缺失右括号的错误’括号明显搞错地方了。
     where trunc(to_number(substr(sDateTime, 11, 2)) / 15) = 1;
      

  3.   

    不好意思,写错了,原句是这样的:
    select sDateTime from t_TableName where EntityID='123' and trunc(to_number(substr(sDateTime,11,2))/15)=1同问