Trying to run this from Liquibase:
--changeset blah runOnChange:true endDelimiter:\n/\s*\n|\n/\s*$
DELETE MYTABLE;
INSERT INTO MYTABLE(A,B,C) VALUES ('A', 'B', 'C');
DECLARE
row_count NUMBER;
BEGIN
SELECT COUNT(1) INTO row_count FROM OTHERTABLE;
IF (row_count = 0)
THEN DELETE MYTABLE WHERE A LIKE 'BLAH:%';
END IF;
END;
/
But getting this error:
Caused by: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
Seems this works in these cases:
- With just the insert/delete (no declare statement block) and without the endDelimiter statement
- With just the declare statement block (no insert/delete) and with the endDelimiter statement
But it doesn't work all together. ??
try
or with a "/" after each statement