Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor

How can I exclude everything after multiple symbols ?

I got values like:

Name
Ben( sa) weld
Sam : 1weld
Tom (us) : Climb

How would I get?

Name
Ben
Sam
Tom
2 Replies
Highlighted

Re: How can I exclude everything after multiple symbols ?

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

];

Highlighted
Honored Contributor III

Re: How can I exclude everything after multiple symbols ?

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

];