Skip to Content
avatar image
Former Member

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

(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",

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 12 at 03:25 AM

    Query doesnt work!

    Where is the reference to T4.DocEntry

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 12 at 10:17 AM

    (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"

    Add comment
    10|10000 characters needed characters exceeded