Getting memory error while doing UNION in SAP HANA

The SQL UNION clause/operator is used to combine the results of two or more SELECT statements without returning any duplicate rows.

To use this UNION clause, each SELECT statement must have

  • The same number of columns selected
  • The same number of column expressions
  • The same data type and
  • Have them in the same order

While performing UNION you need to note that what data it will bring. To perform UNION ALL you need to ensure that views should be fully materialized.

To know more about SAP HANA Modeling, you can refer SAP Guide: