top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Replacing special characters by null

+1 vote
1,543 views

Is there any function to replace the special characters by null in informatica

if we used replacestr function, i think we should specify all special characters

as follows replacestr(input,'!','~','@','#','$','%','^','&','*',null)

But we dont know what are teh special characters will be coming as input.

can u please let me know that which function will be suitable.

posted Jun 12, 2014 by Sunil

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Option 1: Try this - REG_MATCH(input,'[^a-zA-Z0-9]')

Option 2: Try this - REG_REPLACE('[^[:print:]]', NULL)
This will find all non-print characters and replace them with null (I think it'd be better to replace with '')

answer Jun 12, 2014 by Shatark Bajpai
0 votes

Try this:

REG_REPLACE('[^[:print:]]',NULL)

This will find all non-print characters and replace them with null (I think it'd be better to replace with '', but thats just my opinion. Informatica uses POSIX-standard, so you can use others like alnum, punct, whatever you need.

http://en.wikipedia.org/wiki/Regular_expression#POSIX_Extended_Regular_Expressions

answer Jun 13, 2014 by Shweta Singh
Similar Questions
+1 vote

We are facing below error while validating XML file using Java utility, below is error message :

An invalid XML character (Unicode: 0x{2}) was found in the value of attribute "{1}" and
element is "1a". 

for validation we have used XMLspy however it has gave up to open file because of its huge size, please suggest how we can find this invalid character.

All ideas are welcomed.

Thanks

+1 vote

I am facing below error while validating XML file using Java utility, below is error message :

An invalid XML character (Unicode: 0x{2}) was found in the value of attribute "{1}" and element is "1a".

for validation I have used XMLspy however it has gave up to open file because of its huge size, please suggest how we can find this invalid character.

+2 votes

I have data in informatica which I would like to do a textual search/replace. I have a column in the source where records are in "12M" format and I want to replace "M" with "10000000".

For example, "12M" would be come a numeric "120000000"

0 votes

I have program which takes special character as parameter in command line for a program in java.
But I can not send * (asterisk) as input for my program.

Give me some explain and solution for my problem.

...