Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I got values like:
Name |
---|
Ben( sa) weld |
Sam : 1weld |
Tom (us) : Climb |
How would I get?
Name |
---|
Ben |
Sam |
Tom |
Try this
Table:
LOAD *,
Trim(Left(Name, FindOneOf(Name, '`~!@#$%^&*()_+=-}{][":;/.,<>?' & Chr(39))-1)) as New_Name;
LOAD * INLINE [
Name
Ben( sa) weld
Sam : 1weld
Tom (us) : Climb
];
T2:
Load
F1,
If((Index(F1,':')>0 and Index(F1,')')>0),SubField(SubField(F1,':',1),'(',1),
If((Index(F1,':')=0 and Index(F1,')')>0),Trim(SubField(F1,'(',1)),
If((Index(F1,':')>0 and Index(F1,')')=0),Trim(SubField(F1,':',1)),F1))) As Name
Inline
[
F1
Ben( sa) weld
Sam : 1weld
Tom (us) : Climb
];