Skip to Content
0

How i can add distinct in this query in sap business one hana version

Jan 11 at 10:36 PM

72

avatar image
Former Member

(SELECT STRING_AGG(T7."WhsName", ',') FROM RCT2 T5 INNER JOIN OINV T8 ON T5."DocEntry"=T8."DocEntry" INNER JOIN INV1 T9 ON T9."DocEntry" = T8."DocEntry" INNER JOIN OWHS T7 ON T7."WhsCode" = T9."WhsCode" WHERE T5."DocNum" = T4."DocEntry" GROUP BY T5."DocNum", T7."WhsName") AS "Store",

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

2 Answers

Brendan Bell Jan 12 at 03:25 AM
0

Query doesnt work!

Where is the reference to T4.DocEntry

Regards

Share
10 |10000 characters needed characters left characters exceeded
Inga Babco Jan 12 at 10:17 AM
0

(SELECT STRING_AGG(A1."WhsName", ',')

FROM

(SELECT T7."WhsName"

FROM RCT2 T5

INNER JOIN OINV T8 ON T5."DocEntry"=T8."DocEntry"

INNER JOIN INV1 T9 ON T9."DocEntry" = T8."DocEntry"

INNER JOIN OWHS T7 ON T7."WhsCode" = T9."WhsCode"

WHERE T5."DocNum" =T4."DocEntry"

GROUP BY T7."WhsName")

AS A1) AS "Store"

Share
10 |10000 characters needed characters left characters exceeded