I have a string (clob) that contains SQL query with hints, i need to remove those hints from the sql code.
so this:
select
/*+ ALL_ROWS */
/* 2014-12-08 08:26:40.533 -6e99e394:14a2a127782:-466(TXN_ID:-1) */
ID, ORIGIN_TICKET_ID, LIFECYCLE_STATUS ...
should looks like:
select ID, ORIGIN_TICKET_ID, LIFECYCLE_STATUS ...
I tried to play with replace and REGEXP_REPLACE but with no luck so far.
SELECT? Are all these statements stored as single lines, or might they have line breaks? Which version of Oracle?SELECTwith an additional plus sign after the comments openening/*. In your example, the substring holding the date information is an ordinary comment, not a hint.