Home » SQL & PL/SQL » SQL & PL/SQL » creating a procedure
creating a procedure [message #170] Wed, 23 January 2002 13:31 Go to next message
Lance Pris
Messages: 40
Registered: January 2002
Member
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:

* & - + ; / for mod rem an exponent (**) and or group having
intersect minus order start union where connect ||
Re: creating a procedure [message #179 is a reply to message #170] Thu, 24 January 2002 04:58 Go to previous message
Ajay Gandhi
Messages: 14
Registered: January 2002
Junior Member
Put a semicolon after the SQL Stmt

Previous Topic: dynamic sql
Next Topic: How do I query a VARCHAR2 using hex notation ?
Goto Forum:
  


Current Time: Thu Mar 28 07:09:34 CDT 2024