Subject | Re: [firebird-support] how to combine a field value while their id is same? |
---|---|
Author | Mark Rotteveel |
Post date | 2011-10-23T15:01:45Z |
On 23-10-2011 16:05, ibmcom2011 wrote:
SELECT f1, LIST(f2) FROM table GROUP BY f1
Be aware that there is no defined order for the result of LIST.
--
Mark Rotteveel
>The following query should work:
> now i have a table such as:
>
> f1 f2
> 1 aa
> 2 tf
> 1 bb
> 3 cc
> 2 ht
>
> i want the result seems as:
>
> f1 f2
> 1 aa, bb
> 2 tf, ht
> 3 cc
>
> any help is appreciated, thanks.
SELECT f1, LIST(f2) FROM table GROUP BY f1
Be aware that there is no defined order for the result of LIST.
--
Mark Rotteveel