Link to home
Start Free TrialLog in
Avatar of infa008
infa008

asked on

Teradata String Replace Function

Hi,

I have a column with values such as:

A.B.C
1.2.3

It is a varchar column. I would like to strip out all periods from it. Is there a Teradata function or set of functions that can help me do that?

Thanks.
SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well all 4 experts posted something to help answer the question, so split amongst all 4.
Avatar of seenall
seenall

I agree with the previous poster - All 4 posts were valid, - and this post I suspect will be useful for some time to come until Teradata introduce a pre-compiled replace function
Please apply some point distribution
The issue is that we do not know if the proposed solutions really hit what was intended to request. So either all or nothing to accept. All recommendations are valid, but most are completely oversized. Only sabeesh's solution is exactly fitting, because it consideres two dots only. On the other hand, "strip out all periods" could also mean there are more than two, and in that case sabeesh's solution does not fit at all. I really cannot determine which answers are really correct for this case, only the asker can, hence I recommended deletion.

Qlemo
Cleanup Volunteer
Yep, completely understand the reasoning. And the comments have been posted to position accordingly.

But it is a good thread for Terradata "replace" in case anyone else needs it.

Sabeesh can have the "accepted" gong, the rest can be assists because they do provide good information.

Hard one to really score, but think there is value here.
without parroting - all comments are valid - Hopefully congratulations go to Sabeesh -

An interesting case that I shall certainly bookmark
All,
 
Following an 'Objection' by mark_wills (at https://www.experts-exchange.com/questions/26664006/Automated-Request-for-Review-Objection-to-Delete-Q-26435323.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
SouthMod
Community Support Moderator