Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i want compare table1 and table2 and show difference rows in those. common filed in tables is Field1 and result must be
1,a1
2,c1
please tell me how we can do...
--------------------------------------------------------------
Table1:
LOAD * INLINE [
Field1, Name1
1, a1
2, b1
3, c1
4, d1
5, e1
];
Table2:
LOAD * INLINE [
Field1, Name2
2, b2
4, d2
5, e2
];
--------------------------------------------------------------
May be this
Table2:
LOAD * INLINE [
Field1, Name2
2, b2
4, d2
5, e2
];
Table1:
LOAD * INLINE [
Field1, Name1
1, a1
2, b1
3, c1
4, d1
5, e1
]
Where not Exists(Field1);
Drop Table
Table2;
2, c1 ?? or 3, c1 ??? Can you confirm once
excuse me Anil,i wrote wrong . 3,C1 is correct.
result must be:
1,a1
3,c1
Is Field1 some sort of primary key? Then this is pretty simple to accomplish in the UI: create a straight table with all three fields, and add an expression like:
IF (Name1 = Name2, 0, 1)
In your script, outer join Table2 To Table 1 and make a copy of the joined table into a second one whereby you use the expression mentioned above to set a Flag to 0 or 1. That way you'll keep the two values if they're available but different.
can you make qvw file sample for more understand,thanks
May be this
Table2:
LOAD * INLINE [
Field1, Name2
2, b2
4, d2
5, e2
];
Table1:
LOAD * INLINE [
Field1, Name1
1, a1
2, b1
3, c1
4, d1
5, e1
]
Where not Exists(Field1);
Drop Table
Table2;
Here you go