Using replace in TD


Using replace in TD


Is there any way to simulate the oracle's replace function in TD (other than using the UDF oreplace)?

I am facing problem using this:
app_user.oreplace(content_name,'|',' ')

Whenever i try using this it throws the following error: " A column or character expression is larger than the max size."

content_name field has a length of 500.

The reason i want to use replace function is that we have to generate "|" delimited files and it can be possible that content_name itself contain "|" so to address that i wanted to replace a '|' with ''.

Any better solution is welcome.

Thanks in advance!
Junior Contributor

Re: Using replace in TD

Varchar(500) should work, check the definition/source of the oreplace function:

* NOTE: The define MAXIMUM_LENGTH must match the VARCHAR length for
* the return parameter in the CREATE/REPLACE FUNCTION SQL.