有关使用 liquibase 运行存储过程的错误



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

使用以下变更集

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

您的错误消息显示:

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语句

希望这有帮助。

最新更新