Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Brackets within a load script

Hello,

I have a record that looks like this:

LOAD * INLINE [

A, B, C

b, m, a;b;c;e;f;g;h;i;j;k;l;m;n

]

;

What I would like to obtain is the following:

A, B, C

b, m, b;c;d;e;f;g;h;i;j;k;l;m

I have expanded the record using SubField(C, ';') and flagged the b and m records and removed the "noise" values (a and n)

Is there a more elegant way to do this? since I have a lot of records.

Thanks,


Antoine

Tags (3)
1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Brackets within a load script

One approach would be:

LOAD

  A,

  B,

  A & TextBetween(C,A,B) & B as C

INLINE [

A, B, C

b, m, a;b;c;e;f;g;h;i;j;k;l;m;n

];

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

3 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Brackets within a load script

One approach would be:

LOAD

  A,

  B,

  A & TextBetween(C,A,B) & B as C

INLINE [

A, B, C

b, m, a;b;c;e;f;g;h;i;j;k;l;m;n

];

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

Highlighted
MVP
MVP

Re: Brackets within a load script

Sorry, I don't really understand what you are trying to do, or better said, what the requirement is and which logic should be applied.

Using subfield() may be a reasonable way to do what you want, but without knowing what you need, it's hard to say.

Why don't you just post your current script and explain a bit more what you need to do in a more abstract way (how do you determine the noise values, for example? What are fields A, B for? do you need to concatenate the C values again after removing the noise?).

So maybe someone can suggest a more 'elegant' way or at least some alternative implementation.

Highlighted
Partner
Partner

Re: Brackets within a load script

Sorry Stefan if I was unclear.

I will still use subfield at a later step.

I needed to reduce information noise, meaning the values a and n that do not belong to the values between b and m.

I didn't want to post the entire code because I would have to place lots of code and people might not have the patience to read several lines of script. Hence the simplification.

Ultimately
What I am trying to do is create a bracket to perform interval matching.

Thanks for both of you

Antoine