Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, good afternoon!
I have the following question, I have two tables "termination" and "ComplementaryTerminations" where the key among them is cdn_emresa, cdn_estab, cdn_funcionario, month and year. How can I load a third table that is the result of everything that is on Terminations + which has no counterpart in "ComplementaryTerminations"?
example
terminations
Emp Est Employ Month Year
1 1 1 10 2013
1 1 2 10 2013
1 1 4 10 2013
1 1 5 10 2013
ComplementaryTerminations
Emp Est Employ Month Year
1 1 1 10 2013
1 1 3 10 2013
1 1 4 10 2013
1 1 5 10 2013
FinalTable
Emp Est Func Month Year
1 1 1 10 2013
1 1 2 10 2013
1 1 3 10 2013
1 1 4 10 2013
1 1 5 10 2013
HI
Use Not exists() function;
Try like this
TableA:
Load * Inline
[
Emp,Est,Employ,Month,Year
1,1,1,10, 2013
1,1,2,10, 2013
1,1,4,10,2013
1,1,5,10,2013
];
TableB:
Load * Inline
[
Emp,Est,EmployB,Month,Year
1,1,1,10, 2013
1,1,3,10, 2013
1,1,4,10,2013
1,1,5,10,2013
];
NoConcatenate
FullTable:
LOAD * Resident TableA;
Concatenate(FullTable)
LOAD Emp,Est,EmployB AS Employ,Month,Year Resident TableB where not Exists(Employ,EmployB);
DROP Tables TableA,TableB;