how to remove hyphens

Tools
Enthusiast

how to remove hyphens

I have a field which has hyphens in it. For eg, 07-0004196, 5030870, 07-2204193, C00107-2004100 can be some of the values in that field.
I need to remove the hyphens in these fields before comparing these with another field of a different table and i am creating a mapping.

Please let me know how i can remove the hyphens.

Thanks
Mike
2 REPLIES
Enthusiast

Re: how to remove hyphens

I got it... there is a REPLCAECHR function in informatica, but if i have to do this using Teradata SQL, how do i do it?
Enthusiast

Re: how to remove hyphens

You will have to use a combination of SUBSTRING (gives you a portion of a string, takes as argument start [and end] positions) and POSITION (looks up a character's first position in a string) to get your job done.... you can lookup the functions and operators manual for syntax and samples ...

There are also oracle functions UDF available in the teradata website... I do faintly recall that there was a udf for this task as well... so you can try that too... just remember that you would need a C compiler in one of the PE nodes ...