Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In my application, one of the field have data like below
order_description |
No name assigned |
011-390-1 sandhay bhoir |
011-619-01 XYZ |
011-623-01 John ankitson |
100-1143-01 Ankit srivastava |
How can I achieve this output mentioned below:-
order_description |
No name assigned |
sandhay bhoir |
XYZ |
John ankitson |
Ankit srivastava |
This might work if you won't have numbers of - in your order_description's second part
Table:
LOAD *,
Trim(PurgeChar(order_description, '0123456789-')) as new_order_description;
LOAD * INLINE [
order_description
No name assigned
011-390-1 sandhay bhoir
011-619-01 XYZ
011-623-01 John ankitson
100-1143-01 Ankit srivastava
];
why trim it sunny?
There seems to be two spaces one some occasions.... just trying to get rid of any extra spaces at the beginning and/or at the end
u know, I've always thought that trim works like replace(field,' ','')...
But no, trim does not eliminate all the spaces, but rather the "unwanted" ones..