i would like to do an automatic replace with an oracle query in multiple strings available in an oracle table, by changing fields separator ','between first occurrence of 'select' and first occurrence of 'from' without having impact in case is in place a function:
AS IS:
with result as (select column_a, column_b, count(*) from (select column1, column2, column3 ..
select column1, count(distinct coalesce(column2, cast('zz' as nvarchar2(2)))) as value from ...
select count(*) from (select ....
EXPECTED:
with result as (select column_a || column_b || count(*) from (select column1, column2, column3 ..
select column1 || count(distinct coalesce(column2, cast('zz' as nvarchar2(2)))) as value from ...
select count(*) from (select column1, column2, column3 ..