I'm working on teradata log analysis and faced with issue that a lot of queries have comments. Can somebody help in REGEXP_REPLACE definition or may be advice some other way how to do it?
So task is to remove/replace query part with (it can be in any position in sql and may repeat):
I spent a lot of time on it and still get no good results.
I tried to use REGEXP_REPLACE but faced with problems:
Findout how to do it:
RegExp_Replace(SqlTextInfo,'[\t\r\n]|(--[^\r\n]*)|(/\*[\w\W]*?(?=\*/)\*/)')