Subject | Re: [firebird-support] List function, how to sort (FB 2.1) |
---|---|
Author | Dmitry Yemanov |
Post date | 2007-07-22T11:27:36Z |
rj1102 wrote:
explicit ordering.
However, you could try something like this:
SELECT MyField1+0, List(MyField2)
FROM (SELECT MyField1, MyField2 FROM MyTable ORDER BY MyField1,
MyField2)
GROUP BY MyField1+0
(if MyField1 is a string, replace +0 with ||'')
It should provide the ordered list.
Dmitry
>Generally, you cannot. The current implementation doesn't support any
> But how do I sort the values within the list result?
explicit ordering.
However, you could try something like this:
SELECT MyField1+0, List(MyField2)
FROM (SELECT MyField1, MyField2 FROM MyTable ORDER BY MyField1,
MyField2)
GROUP BY MyField1+0
(if MyField1 is a string, replace +0 with ||'')
It should provide the ordered list.
Dmitry