Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "GROUP BY" - FAQ I've no doubt but I can't find the answer
"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:<ts7htds9n8jec0_at_news.demon.nl>...
> The last part in the where clause you added in the subquery
> comparing event time from main and subquery
>
> (pev1.PEV_EVENT_DATETIME =
> pev.PEV_EVENT_DATETIME)
>
> just screws up everything and shows you didn't understand my answer.
... well I suppose when you said ...
>> where pev1.<primary key> = pev.<primary key>)
... I suppose I might have thought you meant "use the primary key" so that's what I did ;-)
As to that being the cause of the difficulty when I drop that off the select list so it reads ...
where
(pev1.PEV_PAR_ID = pev.PEV_PAR_ID)
AND
(pev1.PEV_PET_EVENT_TYPE = pev.PEV_PET_EVENT_TYPE)
);
... I still get all the records and not just the most recent.
Anyway thanks for your help I think I'll carry on with the function approach I outlined in my second post of yesterday.
all the best
richard shea. Received on Wed Oct 10 2001 - 22:28:46 CDT