Skip to Content

Need help in using search_replace function against persistent cache datastore

Hi ,

I am trying to do search_replace in one of my transformation and i am getting the below error:

A NULL replace value is specified in the function <search_replace>. NULL replace value is not allowed for Word and Substring

Sample values from my table are :


------------------- --------------




i NEED TO replace with null for some of the banned key words in email address.

i was trying to do with Search_replace and it is throwing above error.

Please blow some light to fix these error

i tried to give physical table from DB2 and it is also giving the same error.



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Oct 13, 2015 at 05:39 PM

    If you put a 'Null' string instead of a null value in your table, you can use

    decode(search_replace(SRCH_VAL) = 'Null', null, SRCH_VAL)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2015 at 04:58 PM

    Hi Sreenivas ,

    You can use a ifthenelse function also

    ifthenelse ( searchstr = '@NOEMAIL' or '@NO_EMAIL' OR '@NO-EMAIL' , NULL , searchstr ).

    try this one, hope it will work



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.