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: 
mccook
Creator
Creator

Seperating a field

Hi,

 

I have a field with contents like below:

 

Field 1

  90200|19871162|O1|1.000|17.000

1100|203332121|O3|16.000|1.000

The results I am after are (creating separate fields and removing the
pipes):

Field 1      Field 2           Field 3 Field 4  Field 5

90200      19871162       O1      1.000    17.000

1100       203332121     O3      16.000  1.000

Any help appreciated

 

Cheers,

 

Dean

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Load 

  SubField([Field 1],'|',1) as [Field 1],

  SubField([Field 1],'|',2) as [Field 2],

  SubField([Field 1],'|',3) as [Field 3],

  SubField([Field 1],'|',4) as [Field 4],

  SubField([Field 1],'|',5) as [Field 5]

Inline

[

  Field 1

  90200|19871162|O1|1.000|17.000

  1100|203332121|O3|16.000|1.000

];

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Load 

  SubField([Field 1],'|',1) as [Field 1],

  SubField([Field 1],'|',2) as [Field 2],

  SubField([Field 1],'|',3) as [Field 3],

  SubField([Field 1],'|',4) as [Field 4],

  SubField([Field 1],'|',5) as [Field 5]

Inline

[

  Field 1

  90200|19871162|O1|1.000|17.000

  1100|203332121|O3|16.000|1.000

];

anbu1984
Master III
Master III

Load

SubField(Txt,'|',1) As Field1,SubField(Txt,'|',2) As Field2 ... Inline [

Txt

90200|19871162|O1|1.000|17.000

1100|203332121|O3|16.000|1.000 ] ;

er_mohit
Master II
Master II

Hi use subfield function

Like this

load *,subfield(Field,'|',1) as Field1, subfield(Field,'|',2) as Field2,subfield(Field,'|',3) as Field3,

subfield(Field,'|',4) as Field4,subfield(Field,'|',5) as Field5,inline [

Field

  90200|19871162|O1|1.000|17.000

1100|203332121|O3|16.000|1.000

];

hope it helps

Not applicable

Hi,

Use can use Subfield to achieve this...

MarcoWedel

Hi,

another solution could be:

QlikCommunity_Thread_133917_Pic1.JPG.jpg

Generic

LOAD ID,

    'Field '&AutoNumber(RowNo(),ID) as FieldName,

    Field;

LOAD RecNo() as ID,

    SubField([Field 1],'|') as Field

INLINE [

    Field 1

    90200|19871162|O1|1.000|17.000

    1100|203332121|O3|16.000|1.000

];

hope this helps

regards

Marco