6 Replies Latest reply: Jul 21, 2015 10:20 AM by Mathieu LAURIER

# 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:

Nom1,

AA,

ABAA,

AA CC

]

;

T2:

Nom2,

EE,

AB,

AA CC DD

]

;

let i = 1;

do while i<=3

let j = 1;

do while j <=3

T:

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;

;

• ###### Re: Recherche

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

• ###### Re: Recherche

Thank you, I found the problem.

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

• ###### 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

• ###### Re: Recherche

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

• ###### Re: Recherche

Ah I find the error