Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two flat file like,
I want only a mismatch value.How to get it.
Hi All,
i want to load match and mismatch values to store separate column.How to do this,Please help me,
There si a work around,
PFA.
first qvd:
in script
one:
LOAD id
FROM
C:\Users\379790\Desktop\unmatch\src1.xlsx
(ooxml, embedded labels, table is Sheet1);
outer join
two:
LOAD id
FROM
C:\Users\379790\Desktop\unmatch\src2.xlsx
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
//drop table one;
three:
LOAD id as ida,id
FROM
C:\Users\379790\Desktop\unmatch\src1.xlsx
(ooxml, embedded labels, table is Sheet1);
inner join
four:
LOAD id as id
FROM
C:\Users\379790\Desktop\unmatch\src2.xlsx
(ooxml, embedded labels, table is Sheet1);
store one into one.qvd;
store three into three.qvd;
this will create two qvd's one and two.
second qvd:
one:
LOAD id,
ida
FROM
C:\Users\379790\Desktop\unmatch\three.qvd
(qvd);
LOAD id
FROM
C:\Users\379790\Desktop\unmatch\one.qvd
(qvd)
where not exists(id);
This will result in the expected.
-Sundar
Match values can be easily obtained for an inner join .
-Sundar
Dear,
Create two map file one for table 1 and second for table 2, and after that apply first map first to second table and second map to first table, map flag value is match and unmatch.
then concate both tables and you can found match and unmatch values in seperate column.
I have did this in my fix assest application to find addition and deletion assest current and preivous month.
I will also try to send code.
Regards,
Zain.
Hi,
Tab1:
Empid | Name |
101 | irf |
102 | gho |
zee |
Tab2 :
Empid | Name |
101 | irf |
102 | gho |
103 | zee |
Script :
Tab1:
LOAD Empid,
Empid as Empid1,
Name
FROM
(ooxml, embedded labels, table is Tab1);
Right join
Tab2:
LOAD Empid,
Empid as Empid2,
Name
FROM
(ooxml, embedded labels, table is Tab2)
where not Exists(Empid1,Empid);
Result :
Empid1 | Empid2 | Name |
103 | zee |
Is this a question or answer?
aswer