Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: creating a procedure

RE: creating a procedure

From: Gogala, Mladen <MGogala_at_oxhp.com>
Date: Wed, 23 Jan 2002 16:43:37 -0800
Message-ID: <F001.003F9573.20020123164023@fatcity.com>

You used an incorrect name for the procedure. Here is one that compiles flawlessly:

CREATE OR REPLACE Procedure RTFM
Begin
Select A.Pc_session_id From pt_client_event A

       where A.pc_event_op = 'LAUNCH'
       and A.pc_date >=SYSDATE -1

minus
Select B.Pc_session_id From pt_client_event B
       where B.Pc_event_op = 'LOGOUT'
       and B.pc_date >=SYSDATE -1;

End;

The procedure will now compile run without a glitch. It will not do anything, but it will compile. Name is everything! Oh, what the heck, it has been a long day in the office!

-----Original Message-----
Sent: Wednesday, January 23, 2002 6:20 PM To: Multiple recipients of list ORACLE-L

I want to create a stored procedure that takes the following information and puts it into a table. How would I do this?

CREATE OR REPLACE Procedure Used_license as Begin
Select A.Pc_session_id From pt_client_event A where A.pc_event_op = 'LAUNCH' and A.pc_date >=SYSDATE -1
minus
Select B.Pc_session_id From pt_client_event B where B.Pc_event_op = 'LOGOUT' and B.pc_date >=SYSDATE -1
End;

I am tying to do it this way but getting errors:

PLS-00103: Encountered the symbol "END" when expecting one of the following:

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Lance Prais
  INET: lprais_at_ts.checkpoint.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Gogala, Mladen
  INET: MGogala_at_oxhp.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jan 23 2002 - 18:43:37 CST

Original text of this message

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