ORA-00911: 无效字符 问题和解决

来源:互联网 发布:修改linux 7主机名 编辑:程序博客网 时间:2024/06/05 15:30

今天写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’)就可以执行了。

1 0
原创粉丝点击