Re: Distinct in query results in wrong order by
Date: 20 Jun 2003 00:54:59 -0700
Message-ID: <f602866b.0306192354.24a49fe2_at_posting.google.com>
r.pit_at_raadvanstate.nl (Roelof) wrote in message
This amazingly simple solutions did the trick.
Thanks
Roelof
news:<f602866b.0306190508.32251450_at_posting.google.com>...
> We have query like this
>
> select distinct to_char(date_column, 'day dd mm yyyy')
> , next column
> from table
> order by date_colum
>
> It runs OK without the distinct. But with distinct it returns "not a
> selected expression". The next query runs. But it sorts om the name of
> the days insted of the date_column value as intended.
>
> select distinct to_char(date_column, 'day dd mm yyyy')
> , next column
> from table
> order by to_char(date_column, 'day dd mm yyyy')
>
> Help would be highly appreceated.
>
> Roelof
Received on Fri Jun 20 2003 - 09:54:59 CEST