substr [message #38660] |
Sat, 04 May 2002 16:05 |
mani
Messages: 105 Registered: September 1999
|
Senior Member |
|
|
Hi,
iam trying to insert a ' in a string which is passed as input to my procedure.
ex: inputstr_i = 'AA, BB,CC';
how to put ' before and after ,.
basilcally i want output something like this.
inputstr_i = 'AA', 'BB', 'CC';
Appreciate any help
|
|
|
|
|
Re: substr [message #38689 is a reply to message #38660] |
Mon, 06 May 2002 11:48 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Assume p_string is your input parameter to the procedure and v_string is a variable.
v_string := '''' || replace(p_string, ',', ''',''') || '''';
An input string of AA,BB,CC will become: 'AA','BB','CC'
|
|
|