oracle - 错误:ORA-06550:第 4 行,第 205 列:PLS-00103:在预期以下情况之一时遇到符号“文件结尾”:;
问题描述
我正在尝试从.sql文件执行匿名块。我收到以下错误:
错误:
ORA-06550: line 4, column 205:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
;
匿名块如下:
BEGIN
FOR CUR_VAR IN (select id from opco where countrycode in ('IT','PT','DE','ES','GR','UK', 'IE','NL'))
LOOP
insert into vfservice (id, opco_id, name, service_order, service_template, version, service_key, enabled) values (SEQ_SERVICES_ID.nextval, CUR_VAR.id, 'My Vodafone', 0, 'REMOTE_ANONYMOUS', 0, 'SELFCARE',1);
insert into vfservice (id, opco_id, name, service_order, service_template, version, service_key, enabled) values (SEQ_SERVICES_ID.nextval, CUR_VAR.id, 'Vodafone Cloud', 1, 'REMOTE_AUTHENTICATED', 0, 'CONTENTBACKUP',1);
insert into vfservice (id, opco_id, name, service_order, service_template, version, service_key, enabled) values (SEQ_SERVICES_ID.nextval, CUR_VAR.id, 'Vodafone Contacts', 2, 'REMOTE_AUTHENTICATED', 0, 'CONTACTS',1);
end LOOP ;
END ;
我正在使用 grails 3.3.2 和数据库迁移工具和 oracle 10g。
解决方案
只需将 / 放在文件末尾 :)
当您在匿名块中运行过程时,您需要使用以下语法:
declare
begin
end;
/
推荐阅读
- unicode - 是否保证 mbcs 编码中的尾随字节在特定范围内?
- php - 如何使用 google drive api 托管或流式传输在 google drive 中上传的视频
- php - 使用谷歌 API 凭证时需要验证码的谷歌页面速度洞察 API
- python - Python中的浮点不准确 - 如何修复
- java - 如何映射到 h2 中的数组数据类型
- go - 如何根据我发送给 Go 函数的变量返回特定类型的切片
- javascript - Chrome 76 使用导航器将内容复制到剪贴板
- json - 用于 Contentful 的 JSON 配置中的意外令牌}
- r - 相关矩阵将相关性显示为“?”
- python - 如何将来自循环的JSON响应存储到python中的数据框中