Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL redundancies
A copy of this was sent to h0444vcs_at_rz.hu-berlin.de
(if that email address didn't require changing)
On Wed, 30 Jun 1999 17:10:07 GMT, you wrote:
>Dear Readers,
>
>the following SQL Statment produces redundant information.
>
> 1 select a.host, a.session_id, b.session_id
> 2 from weblog a, weblog b
> 3 where a.session_id != b.session_id
> 4* and a.host = b.host
add:
and a.session_id < b.session_id
>
>like :
>
> host s_id s_id
> ------------------
> hostx 1 20
> hostx 1 56
> hostx 20 1
> hostx 20 56 ...
>
>How has the query to be altered, in order to skip the redundancies ?
>
>I'm looking forward to your suggestions !
>
>Markus Banach
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Jun 30 1999 - 15:42:53 CDT