Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys!
I am trying to compare data between 2 files, but I can only obtain results if I use Inner Join on tmap.
Imagine that I have 2 files with the following data:
File A:
Referece;code;qty
XPTO;A;1
XPTO;B;2
XPTO;C;1
XPTI;D;1
XPTI;E;2
XPTI;F;1
File B:
Referece;code;qty
XPTO;A;1
XPTO;B;3
XPTO;C;1
XPTI;D;1
XPTI;E;2
XPTI;F;1
Expected Result:
Referece;code;result
XPTO;A;0
XPTO;B;-1
XPTO;C;1
XPTO;D;1
XPTI;B;-1
XPTI;E;0
XPTI;G;1
XPTI;F;1
XPTI;D;1
I want to have a result with all lines from both files...
Is that an easy way to make this happen?
Thank you!
@Ruben Silva ,use tMap and do the join on Refference and code and then do qty -lookup qty in the output filed of qty, you will get the required output.
Thanks,
Manohar
Hello.
That's what I did....but if I join for code and reference the result is only for columns that matches the same values....
Hi, you can do inner join on reference code and qty. and set MAtch Model to Unique match.
then you make a second output exactly the same as the first one with the same connection in the tmap and in his Property you set Catch lookup inner join reject to true.
So after that you'lhave two output one for the match one for the non match.
Send me Love and Kudos
Hello again.
I did that, but the result it's not what I need....
I know that this can that that easy, but I am really not getting into it....
so the inner join just have to be with reference and code.
it wil check in the file B the row wich have the same reference and code as file A and you can do the substract between qty .
Hello!
Thank you for your help, but we still not getting there....
What I have now is:
I am still missing some results from B file....