declare
doesExists number:=0;
begin
select count(1) into doesExists from tab where tname = 'EOSS2G_GREEN_RLDEP';
if doesExists = 1
then
execute immediate 'drop table EOSS2G_GREEN_RLDEP';
--execute immediate 'create table EOSS2G_GREEN_RLDEP as select * from EOSS2G_RLDEP';
else
execute immediate 'create table EOSS2G_GREEN_RLDEP as select * from EOSS2G_RLDEP';
end if;
end;
/我收到的错误消息是:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
& = - + ; < / > at in is mod remainder not rem
<> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
Position: 28, Line: 2, Column: 21
SQL: declare
doesExists number:=0
^-- error here -- ORA-06550: line 2, column 21:我已经在网上查看了各种各样的解决方案,但它们仍然无助于解决这个问题。
有人能帮我解决这个问题吗?
发布于 2014-10-16 09:32:21
实际上,这个特别的错误并不是因为数据库,而是因为我所使用的平台。为了提交上述语句,我必须在平台中显式指定sql块分隔符。
发布于 2014-10-17 02:34:28
当我遇到这个问题时,我们发现在'/‘之后的最后一行中有一个额外的字符(我认为是^Z)。一旦它被移除,这个街区对我来说就好了。DBA发现了这个问题,但我不记得他使用的是哪个软件显示了这个角色。
您可以尝试删除/后面的每一行,看看这是否有帮助。
https://stackoverflow.com/questions/26400689
复制相似问题