Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Baffling SQL failure in Oracle - anyone explain?
xhoster_at_gmail.com wrote:
> > SELECT DISTINCT(First_Name)
> > FROM Employee
> > ORDER BY Last_Name
> Since John can only show up once in the output, is it at the top of the
> sorted list (John Andrews), in the middle (John Meany), or at the end (John
> White)?
Yes - I have come to understand that effectively what is happening is that one of the last_names is eliminated, and that essentially means that any ORDER BY on this query is nonsensical.
> > Now, I can't for the life of me figure out why this query is failing
> > in Oracle
> Because it is a insane query?
I don't know about insane, but certainly "illogical captain".
> You are missing the fact that it is not possible to fulfill the promise of
> both the distinct and the sort simultaneously.
Gotcha.
Paul...
> Xho
-- plinehan __at__ yahoo __dot__ __com__ XP Pro, SP 2, Oracle, 9.2.0.1.0 (Enterprise Ed.) Interbase 6.0.1.0; When asking database related questions, please give other posters some clues, like operating system, version of db being used and DDL. The exact text and/or number of error messages is useful (!= "it didn't work!"). Thanks. Furthermore, as a courtesy to those who spend time analysing and attempting to help, please do not top post.Received on Sat Aug 13 2005 - 14:44:18 CDT
![]() |
![]() |