Archives of the TeradataForum
Message Posted: Thu, 08 Jan 2004 @ 12:56:25 GMT
Subj: | | Re: How to remove 'spaces' in a telephone number field using Teradata SQL |
|
From: | | Mirjam Berger |
Rachana,
my solution was the one where I substring to every position. It will work with any number of blanks. It is however contingent on the field
being char, not varchar. If it's varchar casting to char is required. I have also tested it. All my inputs were converted correctly. For the one
with the case-statements I could even remove non-numerical characters that tend to sneak into phone number fields.
Find my test cases below :)
tel_numb_no_blanks TEL_NUMB
49210325 +49/2103/25
12345678910 12345678910
12345 12 34 5
123456 123 456
Thanks!
Mirjam
|