I have this SQL script:
Insert into DB_TABLE1 (N, B) values ('30','66');
Insert into DB_EXECUTION (COMMAND)
VALUES ('/* Script generated at 20.04.2006 12:38:44 */
/* error_permissible = 955*/
Create Table map_encodekey
( privatekey VARCHAR2(30) NOT NULL
);
/* error_permissible = 2260*/
Alter Table map_encodekey
Add Constraint map_encodekey_pk
Primary Key
(privatekey);
commit;
');
This script is executed by Liquibase, but it raises this error
...
Caused by: java.sql.SQLSyntaxErrorException: ORA-01756: quoted string not properly terminated
...
The problem is that Liquibase splits the second insert statement when it finds the ';' in the quoted string of the DB_EXECUTION.COMMAND
field; in fact Liquibase doesn't interpret the SQL statements as SQL, but treats them as normal strings.
This is a problem, because I have to split the statements somehow because I have multiple insert statements in the same script (so the splitStatements option is not an option for me) meanwhile I have to tell Liquibase to treat SQL strings as strings which start and end with single quotes.
Is there any way to solve this problem?
Thank you
Giulio