Skip to Content
avatar image
Former Member

SAP HANA Union on Two projection views gives two entries for same PO number

Hi Team,

Iam trying to combine data from two projection views using union , iam getting proper data but when i check the data preview iam getting two entries for one PO number in the output , i have checked regarding this in all forums but without any help .

We are using HANA DB and SP 12 version , iam combining data from four tables for two tables iam using Join1 and for another two tables iam using Join2 , and using union iam combining data from two joins. Any help will be really useful.

Thanks & Regards,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 23, 2017 at 06:15 PM


    By default the union node behaves as a union all operation and that will not remove any duplicate:

    From the documentation:


    UNION ALL Selects all records from all SELECT statements. Duplicates are not removed.

    UNION [DISTINCT] Selects all unique records from all SELECT statements by removing duplicates found from different SELECT statements. UNION has the same function as UNION DISTINCT.


    Use an aggregation node after your union and verify if that gets your duplicate out of the result.

    This was already discussed here.


    Lucas de Oliveira

    Add comment
    10|10000 characters needed characters exceeded