Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I want fetch only unmatched values from two tables below,
and I want the output of unmatched values as shown below,
Please help,
Table1:
LOAD * INLINE [
Date, ID
5/17/2017, 1
5/18/2017, 2
5/19/2017, 3
5/20/2017, 4
5/21/2017, 5
];
NoConcatenate
Final:
LOAD * INLINE [
Date, ID
5/12/2017, 1
5/13/2017, 2
5/14/2017, 3
5/15/2017, 4
5/16/2017, 5
5/17/2017, 6
5/18/2017, 7
5/19/2017, 8
5/20/2017, 9
5/21/2017, 10
]
WHERE NOT Exists(Date);
Drop Table Table1;
Try this may be?
Table1:
LOAD * INLINE [
DateField2, ID
5/17/2017, 1
5/18/2017, 2
5/19/2017, 3
5/20/2017, 4
5/21/2017, 5
];
Final:
LOAD * INLINE [
DateField1, ID
5/12/2017, 1
5/13/2017, 2
5/14/2017, 3
5/15/2017, 4
5/16/2017, 5
5/17/2017, 6
5/18/2017, 7
5/19/2017, 8
5/20/2017, 9
5/21/2017, 10
]
WHERE NOT Exists(DateField2, DateField1);
Drop Table Table1;
Drop Field DateField2;
Load the small table first
Then load the big one with where condition:
Where not Exists(Date)
No, its not working Thirumala... Please suggest any other way.
Table1:
LOAD * INLINE [
Date, ID
5/17/2017, 1
5/18/2017, 2
5/19/2017, 3
5/20/2017, 4
5/21/2017, 5
];
NoConcatenate
Final:
LOAD * INLINE [
Date, ID
5/12/2017, 1
5/13/2017, 2
5/14/2017, 3
5/15/2017, 4
5/16/2017, 5
5/17/2017, 6
5/18/2017, 7
5/19/2017, 8
5/20/2017, 9
5/21/2017, 10
]
WHERE NOT Exists(Date);
Drop Table Table1;
Did you try my solution? Did it work ?
Yes I tried, but its not working.
Strange. It worked at my end. You got what you want. That's good.
Nagaraju, your code worked for me...