1

I have a function that needs a string as parameter. It's always a insert. How do I make it work? The double quotes for the values are not good syntactically

select inversor_insert('INSERT INTO clien(column1,column2) values('value1','value2')') 
from dual;
5

You can try the following;

select inversor_insert(q'[INSERT INTO clien(column1,column2) values('value1','value2')]')

The q'[ ]' construct simply means that Oracle will treat anything within the brackets as it is written. you don't need to worry about quoting the quotes.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.