| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Solved! I think (Re: select distinct on computed column)
Alvin Sylvain wrote:
>
> My failing query read something like the following:
>
> select distinct alias || ' ' || name "thename"
> from personview
>
> and received the 1791 error. W/O the "distinct" it was kool.
We might all get somewhere if you would post the *actual* failing query, rather than 'something like' it.
The manual says that 1791 indicates an error in the ORDER BY clause of a SELECT DISTINCT query. Either Oracle is broken or your actual failing query had an ORDER BY clause.
There is a perfectly sensible restriction on ORDER BY in SELECT DISTINCT queries. To quote the manual again:
If the ORDER BY clause and the DISTINCT operator both appear in a SELECT statement, the ORDER BY clause cannot refer to columns which do not appear in the select list.
Useful things - these manuals! Received on Thu Jan 09 1997 - 00:00:00 CST
![]() |
![]() |