[英]Enviromental issue for ORA-00911: ORA-00911: invalid character\n not due to missing semi-colon ;
I have a website connected to an Oracle database. 我有一个连接到Oracle数据库的网站。 When I execute the following SQL I get a result returned:
当我执行以下SQL时,我得到一个返回的结果:
select distinct name from CONTACTS
where upper(EMAIL) like upper(:info)
AND HASACCESS(NAME, :userid) = 'Y'
order by NAME desc
I have migrated the same code to a new server. 我已经将相同的代码迁移到新服务器。 When this code runs I now get the error:
当这段代码运行时,我现在得到错误:
ORA-00911: invalid character\n
I do not have a ;
我没有
;
on the end which most people get when they get this error. 最后,大多数人在收到此错误时会得到提示。
Doing some trial and error it is crapping on the call to the Stored Producer / Function call. 进行一些试验和错误,这会限制对“存储的生产者/函数”调用的调用。 The database that both bits of code are referencing are the same.
两位代码都引用的数据库是相同的。
It is not to do with the bind variables because if I hard code them then I still get the error. 这与绑定变量无关,因为如果我对它们进行硬编码,那么我仍然会收到错误。
I am really perplexed on this one. 我真的对这个感到困惑。
I have found the issue. 我发现了问题。 It can be seen here
可以在这里看到
select distinct name from CONTACTS
where upper(EMAIL) like upper(:info)
AND HASACCESS(NAME, :userid) = 'Y'
order by NAME desc
When the function is being called it is using the wrong bracket. 调用该函数时,使用了错误的括号。 It is using
(
it should be (
. 它正在使用
(
应该是(
。
PLSQL can run either bracket fine. PLSQL可以很好地运行。
Changing the bracket the code now works. 现在,更改括号即可使用该代码。
Must be a difference in Oracle driver support. 必须在Oracle驱动程序支持方面有所不同。 Or something else environmental.
或其他环境因素。 Hopefully this may help someone else one day...
希望这可能有一天对别人有帮助...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.