oracle PLS-00103:在期望以下之一时遇到符号“文件结束”: := 。(%;
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2477134/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: := . ( % ;
提问by Volodymyr Bezuglyy
Can not run following SQL from ant's sql task:
无法从ant 的 sql 任务中运行以下 SQL :
BEGIN
DBMS_AQADM.CREATE_QUEUE_TABLE(
queue_table => 'MY_QUEUE',
queue_payload_type => 'sys.aq$_jms_map_message');
DBMS_AQADM.CREATE_QUEUE(
queue_name => 'MY_QUEUE',
queue_table => 'MY_QUEUE');
DBMS_AQADM.START_QUEUE (
queue_name => 'MY_QUEUE');
END;
/
There are following errror:
有以下错误:
CreateMyQueue:
[sql] Executing resource: /u1/bin/sql/createMyQueue.sql
[sql] Failed to execute: BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE( queue_table => 'MY_QUEUE', queue_payload_type => 'sys.aq$_jms_map_message')
BUILD FAILED
/u1/bin/.tools/build.xml:194: java.sql.SQLException: ORA-06550: line 1, column 118:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
:= . ( % ;
What is wrong with SQL?
SQL 有什么问题?
回答by Volodymyr Bezuglyy
Here is the solution!
http://www.javaddicts.net/blog/index.php/2005/06/13/executing-oracle-plsql-from-ant/
Following parameters should be used
delimiter="/"
delimitertype="row"
这是解决方案!
http://www.javaddicts.net/blog/index.php/2005/06/13/executing-oracle-plsql-from-ant/
应使用以下参数
delimiter="/"
delimitertype="row"
<project name="SWPDEPLOYMENT" basedir="." default="all">
<target name="createMyQueue">
<sql driver="oracle.jdbc.driver.OracleDriver"
url="${sqlurl}"
userid="${userid}"
password="${pwd}"
print="yes"
delimiter="/"
delimitertype="row"
>
<fileset dir=".">
<include name="createMyQueue.sql"/>
</fileset>
</sql>
</target>