Reputation: 1290
I am trying to return rows which would be useful for setting the in condition in a query. Here is my query
SELECT LISTAGG(PRODUCTID, ',') WITHIN GROUP (ORDER BY RowSequence) FROM DWRE_ITEM_V
which return Order1,Order2
I would like it to return 'Order1','Order2'
I tried using the concat operator || with no luck.
Upvotes: 1
Views: 1345
Reputation: 7928
SELECT LISTAGG(''''||PRODUCTID||'''', ',') WITHIN GROUP (ORDER BY RowSequence)
FROM DWRE_ITEM_V
Upvotes: 3