Subject RE: [firebird-support] LIST function with order by
Author Sasha
>
> I'm confused with the LIST built-in function.
> It seems not possible to use it in non-aggregate statements with ORDER
> BY, for example:
>
> select list(column_name) from all_tab_columns
> where table_name='VV'
> order by column_id;
>
> Invalid token.
> Dynamic SQL Error.
> SQL error code = -104.
> Invalid expression in the ORDER BY clause (not contained in either an
> aggregate function or the GROUP BY clause).
>
> Could this be changed ?

Yes it can be changed to:
select list(column_name) from all_tab_columns
where table_name='VV'
group by column_id
order by column_id

List is aggregate function an follows the rules of aggregation. And since
list is new function in fb 2.1 this question should be posted in
firebird-devel.

Sasha