cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace UNION ALL in query

wojciech_domanski
Participant
0 Kudos

Hi,

I would like to ask. How to write a query (SAP B1) to get the same result as below and avoid using “UNION ALL”. The reason is that yellow arrow link does not work properly when the query contains “UNION ALL”:

SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[U_OrderType] FROM ORDR T0 WHERE T0.[U_OrderType] = 'TRA'
UNION ALL
SELECT T1.[DocNum], T1.[DocDate], T1.[CardCode], T1.[CardName], T1.[U_OrderType] FROM OPOR T1 WHERE T1.[U_OrderType] = 'TRA'

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi Wojchiech,

The drill-down arrows are lost because the parser does not know to which table the DocNum belongs, when using UNION ALL.

As such the only choice you have is to use two separate queries or to not have the drill down arrows.

Regards,

Johan

Answers (1)

Answers (1)

wojciech_domanski
Participant
0 Kudos

Thank You. I will use two seprate queries then.

Regards

Wojciech