Skip to Main Content

How to replace comma separated different values with a particular value

OraDev16Jun 12 2019 — edited Jun 12 2019

Hi All,

          I've a string with the values - 'a','b','c','d,'e'. I need to convert each of the values to the text null - null,null,null,null,null. If there are 10 values in quotes and separated by comma, then 10 null will appear. I tried using REGEXP_REPLACE but failed to get the result.

declare

a varchar2(32767) := q'#'a','b','c'#';

c varchar2(32767);

begin

c := replace(REGEXP_REPLACE (a, <don't know what pattern should be here>, 'null'),'''');

dbms_output.put_line(c);

end;

/

Thank you

This post has been answered by Frank Kulash on Jun 12 2019
Jump to Answer
Comments
Post Details
Added on Jun 12 2019
2 comments
2,005 views