Skip to content
Advertisement

How to use Replace/Substitution function in PL SQL

I’ve a doubt regarding replacing / substituting values in PLSQL. I’ve used listagg to segregate n number of values with each and every value being splitted by comma delimiter.

For instance when executing the above query it returns 7digit alpha numeric values. For example

ABCD123,EFGH456,IJKL789

After storing the above values in a variable. When trying to replace the comma (,) with this (‘,’) using replace function.

It returns the error invalid number of arguments. Is there anyway other than replace function to replace (,) with (‘,’). Thanking you in advance.

Desired output: ABCD123′,’EFGH456′,’IJKL789

Advertisement

Answer

The escape is either a q' or 3 ' s If you wanted to do it in the listagg:

If you want the braces

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement