February 15, 2011 at 2:23 am
Hi all,
I work on a package and I should want truncate a column with Phone number.
example
Input : +33049505059500 00 00 00 00
And in output I want 0495050595.
For this truncate, I use a "Deriver column" with a Conditionnal.
For the moment I have this :
LEN([Data Conversion 1].[Nº de tél. principal]) == 28 ? RIGHT(REVERSE(RIGHT([Data Conversion 1].[Nº de tél. principal],15)),3) : RIGHT([Data Conversion 1].[Nº de tél. principal],10)
But it doesn't work.
I don't have a LEFT fonctiun, and I have to play with REVERSE I think.
Can you help me?
Thanks
February 15, 2011 at 2:25 am
Use SUBSTRING instead of LEFT to achieve the same thing.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
February 15, 2011 at 2:56 am
Thank Phil.
I have already use this function, and I forgot to think at this function
February 15, 2011 at 4:49 pm
mklein2 (2/15/2011)
Thank Phil.I have already use this function, and I forgot to think at this function
Just remember that a phone number can have no country code or a country code with 1 to 3 characters. Unless you have a country code list to compare to, you may be truncating at the wrong place.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply