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: query on last inserted record.....please help

Re: query on last inserted record.....please help

From: M Rothwell <ThisIsABadAddress_at_toobad.com>
Date: Wed, 22 Dec 2004 11:02:44 -0800
Message-ID: <41c9c800$1@usenet01.boi.hp.com>


Mark D Powell wrote:
> I am guessing that addressuid is shared by all the patient addresses so
> unless there is a column in the address table that has the effect of
> ordering the data timewise as Michel suggested then a table change is
> required. I would expect that the address table has an entry date
> associated with each address. Selecting max(entry_date) from address
> where b.addressuid = a.addressuid would work in this case as would a
> sequence number value that might have been added to give the table a
> PK.
>
> -- Mark D Powell --
>

But, if the addressuid is always increasing (typical sequence) then you could do the same thing by selecting max(addressuid). Received on Wed Dec 22 2004 - 13:02:44 CST

Original text of this message

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