statements.execute() 在 PL/SQL 末尾返回带有斜线的错误
执行 pl/sql 时出现错误:
ORA-06550: line 1, column 316: PLS-00103: Encountered the symbol "/" The symbol "/" was ignored.
PLSQL 示例:
DECLARE
SQL1 VARCHAR2 (1500);
SQL2 VARCHAR2 (1500);
BEGIN
SQL1 := 'INSERT INTO das_html_caption VALUES (''test_test'')';
SQL2 := 'DELETE FROM das_html_caption where wording = ''test_test''';
EXECUTE IMMEDIATE SQL2;
EXECUTE IMMEDIATE SQL1;
EXECUTE IMMEDIATE SQL2;
COMMIT;
END;
/
Java:
Statement statement = dbConnection.createStatement();
ResultSet rs = null;
boolean ret = statement.execute( sql.getValue() );
这是正确的错误吗?或者我做错了什么?
谢谢
When executing pl/sql im obtaining an error :
ORA-06550: line 1, column 316: PLS-00103: Encountered the symbol "/" The symbol "/" was ignored.
PLSQL example:
DECLARE
SQL1 VARCHAR2 (1500);
SQL2 VARCHAR2 (1500);
BEGIN
SQL1 := 'INSERT INTO das_html_caption VALUES (''test_test'')';
SQL2 := 'DELETE FROM das_html_caption where wording = ''test_test''';
EXECUTE IMMEDIATE SQL2;
EXECUTE IMMEDIATE SQL1;
EXECUTE IMMEDIATE SQL2;
COMMIT;
END;
/
Java:
Statement statement = dbConnection.createStatement();
ResultSet rs = null;
boolean ret = statement.execute( sql.getValue() );
is it correct error ? or i'm doing something wrong ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
斜杠是您通过交互式环境(例如 SQL*Plus)执行匿名块的方式。如果您通过 Java 调用执行此块,则不需要终止斜杠。
The slash is how you execute the anonymous block through an interactive environment such as SQL*Plus. If you are executing this block by a call from Java you don't need the terminating slash.
找到答案了。不得不向谷歌提出更复杂的请求:)
http://forums.oracle.com/forums/thread .jspa?threadID=519670
Found answer. Had to made more complcated request to google :)
http://forums.oracle.com/forums/thread.jspa?threadID=519670