今天写sql查询数据库数据时出现ORA-00911: 无效字符问题,
我把SQL打到控制台上面,然后COPY到SQL PULS中是可以查询到数据的,
但是在MyECLIPSE中执行就报ORA-00911: 无效字符的错误,
我查了一下,
我的是类似这种的select count(*) as datas from YY_GH_HYXX where pbrq between to_date(to_char(sysdate,’yyyy/mm/dd’),’yyyy/mm/dd’)-7 and to_date(to_char(sysdate,’yyyy/dd’),’yyyy/dd’);
把最后面的;去掉,修改为
select count(*) as datas from YY_GH_HYXX where pbrq between to_date(to_char(sysdate,’yyyy/mm/dd’),’yyyy/mm/dd’)-7 and to_date(to_char(sysdate,’yyyy/dd’),’yyyy/dd’)就可以执行了。