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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Find the first record, for every day

Re: Find the first record, for every day

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: 21 Dec 2005 04:44:31 -0800
Message-ID: <1135169071.638276.100950@g49g2000cwa.googlegroups.com>

ohahaahr_at_hotmail.com wrote:
> There is no difference. The to dates are the same. (No difference in
> time).
>
> What you see is a result of a complex query. If the date is confusing,
> we could change the case to this:
>
> Name Status Rownum
> ------ ------- ------
> OLE 2 1
> OLE 1 2
> PETER 1 3
> JOHN 2 4
> JOHN 10 5
>
> And then the output should look like this:
>
> Name Status Rownum
> ------ ------- ------
> OLE 2 1
> PETER 1 3
> JOHN 2 4
>
> Regards,
> Ole

Then dump the data to af ile where theer is a "first record" because there is not such concept in a relational database. ROWNUM assigns values are Oracle retrieves them from the DB. There is no guarantee they will be retrieved in the same order nexct time you run the query. So can you live with it returning a different result on the next run?

That's why we ask what your REAL crriteria is for preferring the final result include OLE 2 versus OLE 1

Stop treating the result set like a file.

    Ed Received on Wed Dec 21 2005 - 06:44:31 CST

Original text of this message

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