Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
In dimension, I have data as follows,
1718-021-A
1718-021-AA
1718-021-A1
1718-021-AA1
1712-021-B
1718-021-B1
My final requirement is to get the data as follows,
1718-021-A
1718-021-AA
1718-021-A
1718-021-AA
1712-021-B
1718-021-B
Removing all numeric characters from the field.
If it's about removing numerics from last substring, one solution could be like:
Left(YourStringField,FindOneOf(YourStringField,'-',-1)) & Purgechar(SubField(YourStringField,'-',-1),'0123456789')
hi
hope this will help you Removing character values and taking only numeric values from particular field
Also you can refer below blog for better understanding
PurgeChar and KeepChar Functions
Regards,
Mayank
Or this:
Left(Field, Index(Field, '-', -1)) & PurgeChar(SubField(Field, '-', -1), '0123456789')
Hi,
Please find below:
T:
LOAD * Inline [
Data
1718-021-A
1718-021-AA
1718-021-A1
1718-021-AA1
1712-021-B
1718-021-B1
];
NoConcatenate
T1:
LOAD *,
SubField(Data,'-',1)&'-'&SubField(Data,'-',2)&'-'&purgechar(SubField(Data,'-',3) ,'0123456789') as [Final Data]
Resident T;
DROP Table T;
Thanks,
Arvind Patil