Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse statement contains char "№" #2609

Closed
codicuz opened this issue Dec 24, 2019 · 1 comment
Closed

Unable to parse statement contains char "№" #2609

codicuz opened this issue Dec 24, 2019 · 1 comment

Comments

@codicuz
Copy link
Contributor

@codicuz codicuz commented Dec 24, 2019

Which version and edition of Flyway are you using?

Flyway from github, branch master.

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Command-line

Which database are you using (type & version)?

Oracle EE 12.2.0.1

Which operating system are you using?

Linux and many other distrs.

What did you do?

deploy migration with below code:

create or replace package fw_dev_test.test as
    function test(ss in varchar2) return varchar2;
end test;
/

create or replace package body fw_dev_test.test as
    function test(ss in varchar2) return varchar2 is
    begin
        RETURN 'UPPER(NVL(RTRIM(REPLACE(REPLACE(' || ss || ss || Q'[, ' ', ''), '', ''), ','), ]' || ss || '))';
    end;
end test;
/
What did you expect to see?

migration is deployed

What did you see instead?
ERROR: Unable to parse statement in /home/i3/flyway/flyway/sql/V1_1__test.sql at line 6 col 1: Unknown char № encountered on line 9 at column 82

In sqlplus this plsql code is correctly compiled

@codicuz codicuz changed the title Unable to parse statement contans char "№" Unable to parse statement contains char "№" Dec 24, 2019
@juliahayward
Copy link
Member

@juliahayward juliahayward commented Dec 24, 2019

The error is that we're missing the upper-case Q delimiter (and incidentally, using ! as a string delimiter instead of [] {} etc.).

For a quick workround use lower case q'[ ... ]' . A proper fix will be in master asap and shipped in the next patch release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants