Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: DISTINCT in UNION does not work

Re: DISTINCT in UNION does not work

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Thu, 16 Nov 2000 18:24:39 GMT
Message-ID: <8v18os$of9$1@nnrp1.deja.com>

You just can't get duplicates from union. It's impossible. Check if invest_seq_nbr has fracture part which is not printed in output.

In article <8uem77$382$1_at_nnrp1.deja.com>,   shaikh74_at_my-deja.com wrote:
> Hello Deja community:
> Here is something to challenge your mind,
>
> SELECT DISTINCT INV.INVEST_SEQ_NBR,
> FROM INVESTIGATION INV
> UNION
> SELECT DISTINCT INV.INVEST_SEQ_NBR,
> FROM INVESTIGATION INV
>
> I am getting duplicate rows back with same INV.INVEST_SEQ_NBR. I was
> wondering how can I apply DISTINCT on the result set returned by
> UNION. As you can see, in above query DISTINCT is appllied to each
> query but on the final result set. Your assitance is appreiciated.
> Send reply to shaikh74_at_visto.com
> Thanks
> Asad
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 16 2000 - 12:24:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US