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: 
Not applicable

How would I unwrap a field that has two or more information in the same field?

How would I unwrap a field that has two or more information in the same

field?

  Example:

I have in qvd:

  [Number provider]        [Number personal]

          XYX; ABC                     12345

How to i need:

[Number provider]        [Number personal]

          XYX                             12345

          ABC                             12345

Any idea?

1 Solution

Accepted Solutions
maxgro
MVP
MVP

SCRIPT

Source2:

LOAD * INLINE [

Number provider,        Number personal

XYX; ABC,                     12345

];

Table2:

NoConcatenate

load trim(subfield([Number provider], ';', 1)) as [Number provider], [Number personal] resident Source2;

//load left([Number provider], index([Number provider], ';')-1)  as [Number provider], [Number personal] resident Source2;

concatenate (Table2)

load trim(subfield([Number provider], ';', 2)) as [Number provider], [Number personal] resident Source2;

DROP Table Source2;

RESULT

Number personalNumber provider
12345ABC
12345XYX

View solution in original post

2 Replies
maxgro
MVP
MVP

SCRIPT

Source2:

LOAD * INLINE [

Number provider,        Number personal

XYX; ABC,                     12345

];

Table2:

NoConcatenate

load trim(subfield([Number provider], ';', 1)) as [Number provider], [Number personal] resident Source2;

//load left([Number provider], index([Number provider], ';')-1)  as [Number provider], [Number personal] resident Source2;

concatenate (Table2)

load trim(subfield([Number provider], ';', 2)) as [Number provider], [Number personal] resident Source2;

DROP Table Source2;

RESULT

Number personalNumber provider
12345ABC
12345XYX
Not applicable
Author

Thanks!