Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one field like below
| FieldName |
|---|
| AB-12 |
| CD-34 |
| AC-BC-45 |
| AB-AC-56 |
| DE-10 |
My requirement is if a pariticular fieldname value contains non numeric values in its 2nd position then I need to remove first '-' from left.
For example:
Values AC-BC-45
AB-AC-56
conatins non numeric values in its 2nd position (BC and AC)
Now I want to remove first '-' from left and the desired output should like this:
| FieldName |
|---|
| AB-12 |
| CD-34 |
| ACBC-45 |
| ABAC-56 |
| DE-10 |
Please help.
Thanks.
Try with
=PurgeChar(FieldName,'0123456789-')&'-'&KeepChar(FieldName,'0123456789')
Try with
=PurgeChar(FieldName,'0123456789-')&'-'&KeepChar(FieldName,'0123456789')
Try like:
Load
If(not IsNum(SubField(Input,'-',2)), SubField(Input,'-',1)&Mid(Input,Index(Input,'-',1)+1), Input) as NewInput;
Load * Inline [
Input
AB-12
CD-34
AC-BC-45
AB-AC-56
DE-10
];
Hi shoa,
See the example below using an inline load:
DATA:
Load (Left(Data,2)&Mid(Data,4)) AS Data
Inline
[
Data
AB-DC-01
];
Which gives the result ABDC-01
HTH
Andy