-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Hi,
there is an option -ParseGO which splits a file or query into multiple pieces of code and runs each splitted code once at a time.
The problem is that the split doesn't take into account that GO could be in comments.
Would it be possible add an option to Invoke-SQLCmd2 to find and replace any GO inside a comment (especially those starting with /* and ending with */) by a space before actually splitting ?
Some links that could help:
- https://stackoverflow.com/questions/43738916/remove-comment-blocks-in-powershell
- https://fullparam.wordpress.com/2012/03/07/remove-sql-block-comments-via-regex/
- https://larrysteinle.com/2011/02/09/use-regular-expressions-to-clean-sql-statements/
- https://stackoverflow.com/questions/53637395/how-can-i-check-if-a-t-sql-file-contains-go-statements-inside-block-comments-using-powershell/53652440
Metadata
Metadata
Assignees
Labels
No labels