ora2pg icon indicating copy to clipboard operation
ora2pg copied to clipboard

Like operator % at end of search string causes ending quote to match quote char in comment

Open Torquem opened this issue 9 years ago • 2 comments

Seems the % character escapes nect quote character and causes the end quote to be matched from comment at the end of the row. Anything between is replaced by ?TEXTVALUEXXX?

Reproduce: ` CREATE table foo_bar_table( "FOO" NUMERIC, "BAR" VARCHAR(2) );

CREATE OR REPLACE VIEW FOO_BAR_view AS SELECT (SELECT FOO FROM foo_bar_table WHERE FOO = 1 AND FOO IN (SELECT FOO FROM foo_bar_table WHERE UPPER(BAR) = 'FOOBAR' AND UPPER(BAR) LIKE 'BAR%' AND FOO = FOO)) TMP, -- THIS WILL BE MISSING , '') SNAFU, FOO FROM foo_bar_table; `

Results from ora2pg view export: CREATE OR REPLACE VIEW foo_bar_view (tmp, foo) AS SELECT (SELECT FOO FROM foo_bar_table WHERE FOO = 1 AND FOO IN (SELECT FOO FROM foo_bar_table WHERE UPPER(BAR) = 'FOOBAR' AND UPPER(BAR) LIKE 'BAR%?TEXTVALUE150?') SNAFU, FOO FROM foo_bar_table;

Torquem avatar Oct 13 '17 10:10 Torquem

This have already been fixed, please use latest development code and please confirm.

darold avatar Oct 13 '17 13:10 darold

Verified to work in master e4437d5.

Thank you!

Torquem avatar Oct 16 '17 07:10 Torquem