Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

To break a field value

Hi Friends

 

I have following data in a column

 

MAKE_MODEL

TOYOTA AURIS
TOYOTA AT-211
TOYOTA AT211
TOYOTA AQUA-DAA-NHP10
TOYOTA AQUA G HYBRID
TOYOTA AQUA
TOYOTA ALTEZZA
TOYOTA ALPHARD

I want to split it into two columns as shown below

MAKEMODEL
TOYOTAAURIS
TOYOTAAT-211
TOYOTAAT211
TOYOTAAQUA-DAA-NHP10   
TOYOTAAQUA G HYBRID    
TOYOTAACQA
TOYOTAALTEZZA
TOYOTAALPHARD

 

Kindly help me to do it in my data load script 

 

2 Solutions

Accepted Solutions
crusader_
Partner - Specialist
Partner - Specialist

Hi,

try below:

left(MAKE_MODEL,index(MAKE_MODEL,' ',1)-1) AS MAKE

mid(MAKE_MODEL,index(MAKE_MODEL,' ',1)+1) AS MODEL

Hope this helps

//Andrei

View solution in original post

marcohadiyanto
Partner - Specialist
Partner - Specialist

Hi 

You can use subfield function. example subfield(MAKE_MODEL,' ' ,1) as MAKE,  subfield(MAKE_MODEL,' ' ,2) as MODEL.

More info:

SubField(text, delimiter[, field_no ])

https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunc...

 

Thanks

 

View solution in original post

3 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi,

try below:

left(MAKE_MODEL,index(MAKE_MODEL,' ',1)-1) AS MAKE

mid(MAKE_MODEL,index(MAKE_MODEL,' ',1)+1) AS MODEL

Hope this helps

//Andrei

marcohadiyanto
Partner - Specialist
Partner - Specialist

Hi 

You can use subfield function. example subfield(MAKE_MODEL,' ' ,1) as MAKE,  subfield(MAKE_MODEL,' ' ,2) as MODEL.

More info:

SubField(text, delimiter[, field_no ])

https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunc...

 

Thanks

 

upaliwije
Creator II
Creator II
Author

Thanks Both of You