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

Semi colon ; in query #4

Closed
rizwan-ishtiaq opened this issue Jun 5, 2018 · 3 comments
Closed

Semi colon ; in query #4

rizwan-ishtiaq opened this issue Jun 5, 2018 · 3 comments

Comments

@rizwan-ishtiaq
Copy link
Contributor

Problem

sqldump.etl.Query replacing ; with empty string while loading queries from file. (see line 60)

This will case the problem for some case for example below query

with temp as ( SELECT 'value1;value2;value3' text FROM  dual )
select regexp_substr(t.text, '[^;]+', 1, levels.column_value) as text from temp t,
	table(cast(multiset(select level from dual connect by level <= length (regexp_replace(t.text, '[^;]+')) + 1) as sys.OdciNumberList)) levels

Possible solution:

  1. Should not replace the ; (ask in documentation/readme to not put semi-colon in file)
  2. Remove only the last ; from query (in the end of file)
@BernhardSchlegel
Copy link
Owner

Hi there,

thanks for reaching out and many thanks for the solutions. I'd go for the second one since that poses fewer restrictions (and reading the readme requirements) in comparision to the first one.

If you want to submit a PR you are very welcome to do so. I'll update the code as soon as I have time otherwise.

Cheers

@rizwan-ishtiaq
Copy link
Contributor Author

I have created pull request. Also closing the issue

@BernhardSchlegel
Copy link
Owner

cool, thanks-a-lot! merged.

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

No branches or pull requests

2 participants