Substitution of Oracle character

Asked

Viewed 201 times

1

I have a field in my table with a string as follows:

80,82,45,80,82,79,88,73,77,79,32,65,32

I want to replace the comma (,) comma between single quotes (','), to stay:

80','82','45','80','82','79','88','73','77','79','32','65','32

I’m trying this way:

SELECT REPLACE(CAMPO,',','','') 
FROM TABELA;  

But he returns to me:

ORA-00939: many arguments for the function.

Does anyone have any suggestions on how to do?

1 answer

3


Some quotes were missing in the parameters of replace, it is interpreting as having 4 parameters, the last two being '', the correct syntax would be:

SELECT REPLACE('80,82,45,80,82,79,88,73,77,79,32,65,32',',',''',''') FROM dual

Browser other questions tagged

You are not signed in. Login or sign up in order to post.