Como uso o DISTINCT na instrução LISTAGG.
Como por exemplo:
SELECT DISTINCT LISTAGG({User}.[Name], ', ')WITHIN GROUP (ORDER BY {User}.[Name])FROM {User}
Obrigada.
Inês Maia wrote:
Bom dia,
Podes tentar o DISTINCT numa Subquery ao LISTAGG.
Por exemplo:
SyntaxEditor Code Snippet
SELECT LISTAGG(USERNAME, ', ') WITHIN GROUP (ORDER BY USERNAME) FROM (SELECT DISTINCT {User}.[Name] AS USERNAME FROM {User})
Hello Inês
This is not really an OutSystems related question.But a search on google I found this link that may help you:
https://stackoverflow.com/questions/11510870/listagg-in-oracle-to-return-distinct-values
Cheers