Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Most efficient way to create a view with current values
sybrandb_at_hccnet.nl wrote:
> On Mon, 23 Jul 2007 21:11:21 +0200, Bram Pouwelse <bram_at_pouwelse.com> > wrote: >
> > yes of course there is, not using analytical functions. > Also I would contest the second inline view is correct. > > select d.name, > d. code, > d.time, > d.status > from status d > where time= > (select max(time) > from status d1 > where d1.id= d.id > ) >
Sybrand,
I don't get it this would only work if the device and status data are in the same table but they are not.
To get it clear there is a time independent device information table and a status table with multiple status records per device a day. Received on Mon Jul 23 2007 - 14:29:10 CDT