Skip to Content
0

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

Jan 23, 2017 at 03:03 PM

113

avatar image
Former Member

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,

Bala

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member
Jan 23, 2017 at 06:15 PM
0

Hi,

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.

BRs,

Lucas de Oliveira

Share
10 |10000 characters needed characters left characters exceeded