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 -> R: DISTINCT in UNION does not work

R: DISTINCT in UNION does not work

From: Antonio Sant <asant_at_iol.it>
Date: Wed, 15 Nov 2000 19:26:43 GMT
Message-ID: <TrBQ5.64944$BF.2312754@news.infostrada.it>

Very strange!

Especially if you think that:

 SELECT DISTINCT INV.INVEST_SEQ_NBR,
 FROM INVESTIGATION INV
 UNION
 SELECT DISTINCT INV.INVEST_SEQ_NBR,
 FROM INVESTIGATION INV and

SELECT INV.INVEST_SEQ_NBR,
FROM INVESTIGATION INV
UNION
SELECT INV.INVEST_SEQ_NBR,
FROM INVESTIGATION INV ARE THE SAME!!!!! Hope that it can help!

Bye Bye!

<shaikh74_at_my-deja.com> ha scritto nel messaggio news:8uem77$382$1_at_nnrp1.deja.com...
> 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.
Received on Wed Nov 15 2000 - 13:26:43 CST

Original text of this message

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