Subject Re: Ordering in the LIST function
Author martins.goncalo
--- In firebird-support@yahoogroups.com, Dmitry Yemanov <dimitr@...>
wrote:
>
> martins.goncalo wrote:
> >
> > 2: This doesn't work (doesn't order the citys by population)
> >
> > select
> > country.name_country,
> > list(citys.name_city)
> > from country,SP_CITYS citys
> > where citys.id_country = country.id_country
> > group by country.name_country
>
> Try this:
>
> select country.name_country, list(citys.name_city)
> from country
> left join SP_CITYS citys on citys.id_country = country.id_country
> where citys.id_country is not null
> group by country.name_country
>
>
> Dmitry
>

Hello Dmitry:

Tryed that but it's the same. The citys are returned by alphabetical
order (strange...). This only happens if I use the group by. If I do
the list directly to the procedure it works fine.