0

我尝试使用 liquibase 在
sql 文件中使用 / 分隔符执行存储过程,数据库是 db2。问题是它给了我错误 DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=END-OF-STATEMENT;demoTable = ((demovar;) 无法理解原因,因为所有其他存储过程都在同一文件执行得很好..

使用以下变更集

并且 demo.sql 具有存储过程并设置 demovar 在其中声明任何建议是什么原因

4

1 回答 1

1

您的错误消息说:

DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601

-104 代表 SQL0104N,这里是解释。

SQL0104N 在文本后面发现了意外的标记标记。预期的令牌可能包括:令牌列表。
https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.messages.sql.doc/com.ibm.db2.luw.messages.sql.doc-gentopic1。 html#sql0104n

Explanation

A syntax error in the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure was detected at the specified token following the text text. The text field indicates the 20 characters of the SQL statement or the input command string for the SYSPROC.ADMIN_CMD procedure that preceded the token that is not valid.

As an aid, a partial list of valid tokens is provided in the SQLERRM field of the SQLCA as token-list. This list assumes the statement is correct to that point.

This message can be returned when text is passed to the command line processor (CLP) in command mode and the text contains special characters that are interpreted by the operating system shell, such as single or double quotes, which are not identified with an escape character.

The statement cannot be processed.

因此,您可能需要遵循页面的“用户响应”部分并更正demo.sql 中的 SQL 语句

希望这可以帮助。

于 2019-10-28T07:41:27.633 回答