Dear all,

I have a sentence like below:

eg.

"I have a %1, it color is %2, and it costs %3"

This sentence is retrived from a varchar2 column of a table, say if the column is called 'sentence_text',and I would like to replace all %(n) with the input parameters from a procedure. Say for example, the I'm calling the proedure as:

exec testsentence('car','red','$80000');

and the sentence retrieved from 'sentence_text' column could have one, two or more %(n), so how a procedure can be written to handle this? Please advise with codes if possible, thanks.