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: Alternative to a correlated query?

Re: Alternative to a correlated query?

From: Shashank Tripathi <shanx_at_shanx.com>
Date: Thu, 28 Oct 1999 01:19:10 GMT
Message-ID: <3817a3b3.434086@news.netvigator.com>


HI Conan

>Create a cursor that returns a rows for
>that partner, sorted by date descending.
>Fetch the first row. you now have
>the rowid of the record you need.

I tried using rowid (rownum) but it seems that in oracle, the row num is deciphered *while* the SELECT is executing, so row ids are assigned before the ordering of the records! Which means that once the returned rows are ordered, row ids become mangled and hence, useless.

I havent tried creating a "cursor" or a function -- would it be possible for you to gimme a small example of what kind of a function you wrote? I also wonder if something on the DB server side would really help me too much as I am using a visual IDE to access this SQL! (Powerbuilder)

Much appreciated!

Regards
Shanx

Its better to waste your youth than to do nothing with it.

Shashank Tripathi
http://shanx.com Received on Wed Oct 27 1999 - 20:19:10 CDT

Original text of this message

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