on 12-15-2016 8:20 AM
Hi,
I found this difficult sample code for an join of different entities.
Please, could somebody show me, if I would only join E and G by "id", how this should look like. I don't get it to work.
Thanks!
entity E {
key id : Integer;
a : Integer;
};
entity F {
key id : Integer;
b : Integer;
};
entity G {
key id : Integer;
c : Integer;
};
view V_join as select from E join (F as X full outer join G on X.id = G.id) on E.id = c {
a, b, c
};
}
What issues do you get?
Joining E and G with an inner join via the ID would look for instance like following:
view vTest as
select from E inner join G on E.id = G.id
{
E.id as eid,
G.id as gid,
E.a,
G.c
};
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Additionally, you can use the CDS Graphical Editor for your CDS modelling if you are using SAP Web IDE for SAP HANA. It is available from HANA 1.0 SPS11 onwards with baisc features like CDS Entitites, contexts, associations etc. From the release HANA2.0 SPS00, the graphical editor supports CDS View modelling as well.
With the graphical editor, you can easily create, associate, and model your CDS artifacts with a simple drag and drop paradigm and you will not have to write all this CDS script anymore.
Here is a documentation for the same:
Regards,
Rutika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Dirk,
The join of E and G by id will look like what Florian has answered.
The complex view definition in your question though, is a join of E with (a join of F and G).
Regards,
Rutika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.