on 2020 May 21 7:40 AM
Hello.
I need create a left join in a HANA calculated View using a filter in the right tabla a field from de left table, for selecting in the right table the correct record with the graphical tool like this:
I have 2 tables, the table A has one ID and one date and the table B has one ID, datefrom and dateto for sereveral jobs.
I need select form the table B wich job is between the date form the table A using the field DATE from the table A as a filter in the table B (DATEFROM <= DATE, DATETO >= DATE) in the join
I explain with an example
TABLE A:
ID_PERSON,NAME,DATE
0001,XXXX,20200102
002,YYYY,20180506
003,ZZZZ,20190108
TABLE B:
ID_PERSON,JOB,DATEFROM,DATETO
0001,JOB1,20190101,20191231
0001,JOB2,20200101,20201231
0002,JOB2,20170101,20171231
0002,JOB3,20180101,20181231
0003,JOB1,20000101,25000101
I need with a left join get the following:
ID_PERSON,NAME,JOB
0001,XXXX,JOB2 -> DATE = 20200102 DATEFROM =20200101 DATETO 20201231
0002,YYYY,JOB3 -> DATE = 20180506 DATEFROM = 20180101 DATETO = 20181231
0003,ZZZZ,JOB1 -> DATE = 20190108 DATEFROM = 200000101 DATETO = 25000101
Is this posible in the graphical tool?
Kind regards.
Hello.
I get the solution with several proyections, i think it is not a optimal solution becasuse i hava some full joins. I think that hana gui is very poor.
I explain my solution: (it can be resumed with lees nodes).
Join_1
Proyection_3
Nodes SI/NO
Join_2
Proyection_4
Proyection_5
Union_1
Aggregation
Kind regads.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.