Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
As i am new to qlikview, i have basic question about joins..
Table A |
Joining field |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Table B | ||||||||
Joining field | ||||||||
7 | ||||||||
8 | ||||||||
9 | ||||||||
|
Which kind of join i can use to get this output? or any function?
May be Inner Join on Joining field
Thanks Sunny... inner join is giving result as 7.. which is common
My bad, you are right... May be Where not Exists instead of join
TableB:
LOAD Joining Field,
....
FROM TableB;
TableA:
LOAD Joining Field,
...
FROM TableA
Where Not Exists(Joining Field);
Left Join(TableA)
LOAD *
Resident TableB;
DROP Table TableB;
then do inner join ,later drop the field
drop field fieldName(your case 7);
Hi Sridhar,
Your output seems to be data from left table.
So, may be left join (Table A left join Table B)will give you the required output.
Thanks,
Neha
Hi,
this logic worked fine for me and it seems simple
TableB:
LOAD * INLINE [
JoinTable
7,
8,
9,
10];
TableA:
right join
LOAD * INLINE
[
JoinTable,
1
2
3
4
5
6
7
]
Where not Exists(JoinTable)
hope this helps
thanks
Try this,
T1Temp:
LOAD F1 as F1Temp;
LOAD * INLINE [
F1
1
2
3
4
5
6
7
];
Inner Join(T1Temp)
LOAD F1 as F1Temp;
LOAD * INLINE [
F1
7
8
9
];
Final:
LOAD * INLINE [
F1
1
2
3
4
5
6
7
] Where not Exists(F1Temp,F1);
Concatenate(Final)
LOAD * INLINE [
F1
7
8
9
]Where not Exists(F1Temp,F1);
DROP Table T1Temp;
Hello Sridhar,
Trust that you are doing great!
Please refer given sample script:
[Table A]:
LOAD * INLINE [
Joining field
1
2
3
3
3
4
5
6
7
];
LEFT JOIN
[Table B]:
LOAD *, RowNo() AS RowNo INLINE [
Joining field
3
3
7
8
]
;
TableA:
LOAD DISTINCT [Joining field]
Resident [Table A]
Where Len(RowNo) = 0;
DROP Table [Table A];
Hope this will be helpful.
UPDATED: Modified the script as well as application to get desired result in case of duplicates in data set.
Regards!
Rahul
Thank you all.... unfortunately the field value may duplicate something like this.
Table A |
Joining field |
1 |
2 |
3 |
3 |
3 |
4 |
5 |
6 |
7 |
Table B |
Joining field |
3 |
3 |
7 |
8 |
Output table should be |
Joining field |
1 |
2 |
4 |
5 |
6 |
I cannot make any composite in my case... so would it be possible to get result using above? It is just sample data...