Subject | Re: For listing purposes flattening a many-side-table of a one-to-many relation |
---|---|
Author | Bhavbhuti Nathwani |
Post date | 2009-07-05T18:15:39Z |
Okay. Thanks Svein.
--- In firebird-support@yahoogroups.com, Svein Erling Tysvaer <svein.erling.tysvaer@...> wrote:
>
> > 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
>