PLS-00103: Encountered the symbol "" when expecting one of the following_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2354 | 回复: 0   主题: PLS-00103: Encountered the symbol "" when expecting one of the following        下一篇 
shunzi
注册用户
等级:上尉
经验:782
发帖:133
精华:0
注册:2011-10-10
状态:离线
发送短消息息给shunzi 加好友    发送短消息息给shunzi 发消息
发表于: IP:您无权察看 2015-4-22 9:53:03 | [全部帖] [楼主帖] 楼主

今天碰到执行PL/SQL块报错,根据错误提示是提交给oracle的sql(过程和函数)写法不符合oracle的标准。分析得出是块中有不明字符,将空格部分去掉即可。

 SQL> declare
2   type numbers is table of number;
3   n numbers := numbers();
4   begin
5   n.extend;
6   n(1) := 2;
7   n.extend;
8   n(2) := 3;
9   for i in 1 .. n.count loop
10   dbms_output.put_line(n(i));
11   end loop;
12   end;
13 /
declare
type numbers is table of number;
n numbers := numbers();
begin
n.extend;
n(1) := 2;
n.extend;
n(2) := 3;
for i in 1 .. n.count loop
dbms_output.put_line(n(i));
end loop;
end;
ORA-06550: line 3, column 2:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> form
current cursor
SQL> declare
2  type numbers is table of number;
3  n  numbers := numbers();
4  begin
5  n.extend;
6  n(1) := 2;
7  n.extend;
8  n(2) := 3;
9  for i in 1..n.count loop
10  dbms_output.put_line(n(i));
11  end loop;
12  end;
13  /
PL/SQL procedure successfully completed


--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论