我尝试使用具有/分隔符的liquibase执行存储过程
SQL文件数据库是db2。问题是它给我的错误是DB2 SQL错误:SQLCODE = -104,SQLSTATE = 42601,SQLERRMC = END-OF-STATEMENT; demoTable =((demovar;)无法像其他所有存储过程一样理解原因文件执行得很好..
使用以下更改集
和demo.sql具有存储过程并在其中设置demovar声明 任何建议是什么原因
答案 0 :(得分: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语句。
希望这会有所帮助。