Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
Please help me to get below answer
example tables :
table 1:
id | value |
1 | 100 |
2 | 200 |
table 2:
id | value |
1 | 50 |
1 | 100 |
2 | 200 |
3 | 150 |
3 | 200 |
4 | 250 |
4 | 300 |
4 | 350 |
output:
id | value |
3 | 150 |
3 | 200 |
4 | 250 |
4 | 300 |
4 | 350 |
i have used where not Exists , i am getting one value for each id (it is giving unique values )
My case i want all the values as like output.
Can you suggest me something.
Thanks
T1:
Load id as ID, value as VALUE Inline
[
id, value
1,100
2,200
];
NoConcatenate
T2:
Load * Inline
[
id, value
1,50
1,100
2,200
3,150
3,200
4,250
4,300
4,350
] Where Not Exists(ID,id);
Drop Table T1;
Try like this -
[table 1]:
Load *,id as tempid inline [
id, value
1, 100
2, 200 ];
[table 2]:
Load * inline [
id, value
1 ,50
1, 100
2,200
3, 150
3 ,200
4, 250
4, 300
4 ,350 ]
Where not exists (tempid,id);
Drop field tempid;
drop table [table 1];
T1:
Load id as ID, value as VALUE Inline
[
id, value
1,100
2,200
];
NoConcatenate
T2:
Load * Inline
[
id, value
1,50
1,100
2,200
3,150
3,200
4,250
4,300
4,350
] Where Not Exists(ID,id);
Drop Table T1;
Thanks for the reply,
This will not work in my case , if you see i don't want get id (1,2) and their values into my output table.
Thanks
Have you tried ?
Hi Manish ,
Thanks it worked.
You won't get id = 1,2
Yes, you are right , typo from my side .
Thanks
In this case, you should have selected his answer correct and my one helpful to give more credit to him.