Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Recherche

Hello,

would you help me to correct this codes? Thank you first!

the goal is to have a table as:

TNom1, TNom2

AA, AA CC DD

ABAA, AB

AA CC, AA CC DD

I have to use the method following (do while), because, the truth datas are too big, I can't use "left join".

the second do while can't work, j=1 always.

T1:

load * inline [

Nom1,

AA,

ABAA,

AA CC

]

;

T2:

load * inline [

Nom2,

EE,

AB,

AA CC DD

]

;

let i = 1;

do while i<=3

    let j = 1;

    do while j <=3

        T:

        load

        peek(Nom1, $(j), 'T1') as TNOM1,

        peek(Nom2, $(j), 'T2') as TNOM2

        Resident T1

        where index( peek(Nom1, $(i), 'T1'), peek(Nom2, $(j), 'T2'), 1) >0 or index( peek(Nom2, $(j), 'T2'), peek(Nom1, $(i), 'T1'), 1)>0 ;

    j = j+1;

    loop 

i = i+1

loop

;

drop table T1, T2;

;

6 Replies
ramoncova06
Valued Contributor III

Re: Recherche

do you have a key field that can be used to join/map them ?

Not applicable

Re: Recherche

Ah I find the error

Not applicable

Re: Recherche

Thank you, I found the problem.

when the data is very big, we can't use join first i think.

ramoncova06
Valued Contributor III

Re: Recherche

it does depend if you just want to join one field then a map is better, but if you want to join several fields then you could use the join, though you have to be careful and always have a field that matches on both tables, otherwise you would end up creating a cartesian product 

Not applicable

Re: Recherche

I recherche the thing not exactly the same, for exemple "A" is in "AB", we can't use join for this, no?

Not applicable

Re: Recherche

Ah non

Community Browser