I'm trying to execute the following code with Liquibase.
BEGIN ATOMIC
DECLARE I INT DEFAULT 6;
WHILE I <= 10 DO
INSERT INTO LQBTEST.department (id,name,active) VALUES (I,"pl",1);
SET I = I + 1;
END WHILE;
END@
I tried it with
<sql endDelimiter="@" splitStatements="false"></sql>
which resulted in liquibase telling me that my markup was wrong then I tried:
<sqlFile endDelimiter="@"
path="proc.sql"
relativeToChangelogFile="true"
splitStatements="false"
stripComments="true"/>
results in:
Unexpected error running Liquibase: com.ibm.db2.jcc.am.SqlSyntaxErrorExc
DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=pl, DRIVER=3.63.75
Help is really appreciated.
"pl"
is a column name, not a string.'pl'
would be string. Btw: that's not PL/SQL. There is noBEGIN ATOMIC
or `SET in PL/SQL. – a_horse_with_no_name