on 10-13-2015 4:50 PM
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 :
SRCH_VAL REPLACE_VAL
------------------- --------------
@NOEMAIL. NULL
@NO_EMAIL. NULL
@NO-EMAIL. NULL
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.
Thanks,
Sreenivas
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Thanks,
Sravan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.