Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 08 Jan 2004 @ 12:56:25 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: How to remove 'spaces' in a telephone number field using Teradata SQL
From:   Mirjam Berger


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



  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020