You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DECLARE
e_error EXCEPTION;
PRAGMA exception_init ( e_error,-00942 );
BEGIN
EXECUTE IMMEDIATE 'drop table AD_GROUP_ROLE_MAPPING';
EXCEPTION
WHEN e_error THEN
NULL;
END;
/
CREATE TABLE AD_GROUP_ROLE_MAPPING
(
AD_GROUP_NAME VARCHAR2(200) NOT NULL,
ROLE_ID NUMBER,
PRIMARY KEY (AD_GROUP_NAME)
)
There are two important changes.
First in the changelog. I set the "endDelimiter" to "/" because that is what you use to split the statements. After this it will stop whining about the unexpected symbol.
Second I removed the semicolon in the SQL File after "CREATE TABLE ..." statement. This is needed because semicolon is not the end delimiter and liquibase expects pure SQL statements to be written without the semicolon.
Hello Team,
We are trying to run a Stored procedure and a SQL statement in the same liquibase changeset using Liquibase 3.8.0 and getting below error.
change set
SQL FILE
DECLARE
e_error EXCEPTION;
PRAGMA exception_init ( e_error,-00942 );
BEGIN
EXECUTE IMMEDIATE 'drop table XXXX.AD_GROUP_ROLE_MAPPING';
EXCEPTION
WHEN e_error THEN
NULL;
END;
/
CREATE TABLE XXXX.AD_GROUP_ROLE_MAPPING
(
AD_GROUP_NAME VARCHAR2(200) NOT NULL,
ROLE_ID NUMBER,
PRIMARY KEY (AD_GROUP_NAME)
);
Error
Unexpected error running Liquibase: ORA-06550: line 12, column 2:
PLS-00103: Encountered the symbol "/"
[Failed SQL: (6550) DECLARE
e_error EXCEPTION;
PRAGMA exception_init ( e_error,-00942 );
BEGIN
EXECUTE IMMEDIATE 'drop table XXXX.AD_GROUP_ROLE_MAPPING';
EXCEPTION
WHEN e_error THEN
NULL;
END;
/
Could you please help?
Thanks & Regards
Arif
┆Issue is synchronized with this Jira Bug by Unito
The text was updated successfully, but these errors were encountered: