Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Returning DISTINCT rows when SQL *DOES NOT* contain distinct!
Carlos wrote:
>>>Nothing in a WHERE clause will help you; only DISTINCT or GROUP BY
But he doesn't have control over the 'from'. He might be able to do something similar by moving the 'select' in the 'from' to a 'where' something like
where rowid = ( select * from ( select id, txt, rowid, rank() over (partition by id, txt order by rowid) v_rank from prueba) where v_rank =
1 )
>
> ID TXT
> ---------- ----------
> 1 ONE
> 2 TWO
>
> SQL>
>
> No DISTINCT, no GROUP BY.
>
> Cheers.
>
> Carlos.
>
Received on Thu May 12 2005 - 08:09:25 CDT