Join using CE functions in SAP HANA database

You can try using projection node as follows to perform joins in SAP HANA using CE functions. The CE_PROJECTION function allows you to select specific columns and rename them, while CE_JOIN performs the actual join operation between tables.

Example

Here's how to join two tables using CE functions with column projection and renaming ?

table1 = CE_PROJECTION(:T1,["ACCT_ID","SALARY"]);
table2 = CE_PROJECTION(:T2,["EMPL_ID" AS "ACCT_ID","ADD","ZIP","STATE"]);
var_out = CE_JOIN(:table1,:table2,["ACCT_ID"]);

Using Projection node, you can rename the column names. Note that EMPL_ID has been renamed to ACCT_ID in the second projection to create a common join key between the two tables.

In this example:

  • table1 projects columns ACCT_ID and SALARY from table T1
  • table2 projects columns from T2, renaming EMPL_ID to ACCT_ID for the join
  • CE_JOIN performs an inner join on the common ACCT_ID column

Conclusion

CE functions in SAP HANA provide a powerful way to perform table joins with column projection and renaming capabilities. This approach allows you to create flexible data retrieval operations by combining multiple tables based on common keys.

Updated on: 2026-03-13T18:44:46+05:30

395 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements