Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I have one table ?

Hi all,

i have one  table ,in table has Employee field ,

the field like this

Employee

--------------

1000-abc

1001-xyz

1002-mno

1003-def

1004-ghi

1005-klm

so i want output  is like this

Employee    Name

1000            abc

1001           xyz

1002           mno

1003           def

please tell me any one which functions using.

5 Replies
PrashantSangle

Hi,

Use Subfield()

subfield(FieldName,'-',1) as Employee

subfield(FieldName,'-',2) as Name

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
arulsettu
Master III
Master III

hi try this too

right(field,3) as Name,

Left(field,4) as Employee

raghvendrasingh
Creator II
Creator II

Hi,

can try this script:-

Tab1:

LOAD * INLINE [

   Employee

1001-Abcfhg

1002-cDf

1003-he

1004-Yft

1005-KruFt

1006-hrtfrxcdbvdas

1007-ktg

1008-htF

1009-bejy

1010-HbJ

1011-iufewfr

];

Tab2:

Load subfield(Employee,'-',1) as Employee,

purgechar(Employee,'0123456789-') as Name Resident Tab1;

Drop Table Tab1;

Hope this will work.

Thanks,

RS

Not applicable
Author

thank you it's working

arulsettu
Master III
Master III

choose the correct answer to close this thread