Teradata / PyTd

A Python Module to make it easy to script powerful interactions with Teradata Database in a DevOps friendly way.
MIT License
108 stars 43 forks source link

teradata.BteqScript is not splitting correctly when semicolons exist inside comments. #59

Open mikedine opened 7 years ago

mikedine commented 7 years ago

I am having problems with bteqsplit() when semicolons are included inside comments.

The bteqsplit is finding the semicolon and producing an invalid sql statement.

Some of the examples I have encounter are:

Bad Example 1 FROM MY_DB.MY_CUSTOM_VIEW --; GROUP BY

Bad Example 2 FROM MY_DB.MY_CUSTOM_VIEW /* Present Insert records ; */ GROUP BY

Bad Example 3 FROM MY_DB.MY_CUSTOM_VIEW --; GROUP BY

Bad Example 4 FROM MY_DB.MY_CUSTOM_VIEW /* ; /* GROUP BY

Thanks, Mike