I'm using Oracle 11g and I'm having trouble replacing multiple characters based on positions mentioned in a different table. For example:
Table 1
PRSKEY POSITION CHARACTER
123 3 ć
123 9 ć
Table 2
PRSKEY NAME
123 Becirovic
I have to replace the NAME in Table 2 to Bećirović.
I've tried regexp_replace but this function doesn't provide replacing more then 1 position, is there an easy way to fix this?
group byand addLISTAGG()function (for MySQL the same is GROUP_CONCAT). Need to order group members and cut strings to have multiple pieces. Should work but the query would be tricky. Easier to introduce a function.