Subject [firebird-support] Re: For listing purposes flattening a many-side-table of a one-to-many relation
Author Svein Erling Tysvaer
> but even something simple like:
> SELECT LIST(maccounts.ccode, ',')
> FROM maccounts
>
> will return duplicates as comma separated, so a 100 records with 25 values repeated will still return a string with 100 values comma separated.

This bit is simple, just do

SELECT LIST(DISTINCT maccounts.ccode, ',')
FROM maccounts

HTH,
Set