PLS-00103:在简单更新块中遇到了“文件结尾"符号 [英] PLS-00103: Encountered the symbol “end-of-file” in simple update block

查看:112
本文介绍了PLS-00103:在简单更新块中遇到了“文件结尾"符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过查询

BEGIN 
    INSERT INTO
        WEB_FE_USER_QUERY(
            LISTING_ID ,
            QUERY_NAME ,
            USER_PREFERENCE ,
            USER_CRITERIA ,
            DEFAULT_QUERY ,
            CREATED_DATE_TIME ,
            IS_GLOBAL
        )
    VALUES(
        '0' ,
        'NovatedTrades' ,
        'test' ,
        'test' ,
        0 ,
        TO_DATE(
            '2013-06-14 20:28:16' ,
            'YYYY-MM-DD HH24:MI:SS'
        ) ,
        0
    );
END;

谁能告诉我那个SQL有什么问题吗?

Can anyone tell whats wrong with that sql please??

推荐答案

DBeaver 但仍然是真的

DBeaver apparently doesn't support PL/SQL. That's an old thread, but still seems to be true.

从您看到的行为来看,它似乎将分号视为语句分隔符,并将所有内容传递到第一个分号(即,在; END;之前的)之前)到Oracle,Oracle进行了解析片段作为PL/SQL.

From the behaviour you're seeing it seems to be treating the semicolons as statement separators, and is passing everything up to the the first semicolon (i.e. up to ) before ; END;) to Oracle, which does parse that fragment as PL/SQL.

您可以在SQL Developer中产生相同的错误,方法是省略第一个分号后的代码,或者选择该行之前的文本并尝试运行它:

You can generate the same error in SQL Developer by omitting the code after the first semicolon, or by selecting the text up to that, and trying to run it:

...
        ) ,
        0
    )
Error report -
ORA-06550: line 23, column 5:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

   ;

可能不是您想听到的,但是您似乎需要使用其他客户端来运行PL/SQL块. SQL Developer 是免费的,并且相当不错天.当然还有其他客户可用...

Probably not what you want to hear, but it looks like you'll need to use a different client to run PL/SQL blocks. SQL Developer is free and is pretty good these days. Other clients are available of course...

这篇关于PLS-00103:在简单更新块中遇到了“文件结尾"符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆