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: "GROUP BY" - FAQ I've no doubt but I can't find the answer

Re: "GROUP BY" - FAQ I've no doubt but I can't find the answer

From: Richard Shea <rshea_at_my-deja.com>
Date: 9 Oct 2001 22:34:23 -0700
Message-ID: <43160f6f.0110092134.9df6ad3@posting.google.com>


Well I have already (approx 2001-10-10 01.00 UTC) posted a follow up to this thread which doesn't seem to have appeared yet in the NG. I'll assume it will appear and go on from there.

Basically I had some difficultities with the approaches suggested and I started looking for alternate methods. I seem to have found one by writing a function like this ...

CREATE FUNCTION (PAR_ID_IN IN TAS_PARTICIPANT.PAR_AUTOID%TYPE)   RETURN NUMBER
IS
  CURSOR PEV_CUR
  IS
  SELECT PEV_PET_EVENT_TYPE,PEV_EVENT_DATETIME   FROM TAS_PARTICIPANT_EVENT
  WHERE PEV_PAR_ID = PAR_ID_IN
  ORDER BY PEV_EVENT_DATETIME DESC;   latest_Event_Type TAS_PARTICIPANT_EVENT.PEV_PET_EVENT_TYPE%TYPE;   latest_Event_DateTime TAS_PARTICIPANT_EVENT.PEV_EVENT_DATETIME%TYPE;

BEGIN
  OPEN PEV_CUR;
  FETCH PEV_CUR INTO latest_Event_Type,latest_Event_DateTime;   CLOSE PEV_CUR;
  RETURN latest_Event_Type;
END; ... I'd still be interested in finding a less clunky way of doing it but this at least seems to provide me what I need in the short term.

Thanks for all help and I'd still be interested to hear suggestions to the original post.

regards

richard shea.
rshea_at_my-deja.com Received on Wed Oct 10 2001 - 00:34:23 CDT

Original text of this message

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