Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have a field that i am currently stripping all numbers from.
PurgeChar([Cell Name],'0123456789') as [BaseStation Name],
but i have found that for some particular values of this field i need to keep the first number.
here is an example of the values..
[Cell Name]
ADDAX1
ADDAX2
ADDAX3
PLU1
PLU2
PLU3
BO31
BO32
BO33
BO41
BO42
BO43
BO51
BO52
what i want is an if statement before my Purgechar statement to say that if the Cell name =BO* then take the first 3 characters (i.e. BO3, BO4 etc) otherwise do my purgechar statement.
I cant seem to get it to work, can anyone help?
You will need this:
if(left([Cell Name], 2) = 'BO', left([Cell Name], 3), purgechar([Cell Name], '0123456789')) as [BaseStation Name],
Hope that helps,
Steve
hi
left([Cell Name],3)
You will need this:
if(left([Cell Name], 2) = 'BO', left([Cell Name], 3), purgechar([Cell Name], '0123456789')) as [BaseStation Name],
Hope that helps,
Steve
hi
if(wildmatch([Cell Name],'BO*'),left([Cell Name],3),[Cell Name]) as new_[Cell Name]
IF(LEN(PurgeChar([Cell Name],'0123456789'))>3,
PurgeChar([Cell Name],'0123456789'),
Left([Cell Name],3)) as [BaseStation Name],
if(left(YourField,2) = 'BO', left(YourField,3), YourPurgeCharExpression) as NewField