Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replace function

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
CA
Hi,

Inside a stored procedure i would like to use the replace function as such:

if instr(serv,'AAA')>0 then
replace(serv,'AAA','+');

at compile time i get an error saying that 'replace is not a procedure or is undefined'. i tried adding "standard" in front of replace since replace is in the "standard" oracle package, but still it didn't work. Can someone please tell me what i am doing wrong and what i need to do to make use of the replace function?

thanks any help is much appreciated
 

Pass your result to another variable, because REPLACE is a function and not a procedure.

For example,

if instr(serv,'AAA')>0 then
v_new_serv := replace(serv,'AAA','+');





Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top