Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
;
do you have a key field that can be used to join/map them ?
Ah I find the error
Thank you, I found the problem.
when the data is very big, we can't use join first i think.
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
I recherche the thing not exactly the same, for exemple "A" is in "AB", we can't use join for this, no?
Ah non