Re: Procedure Help

Re: Procedure Help

 

  

You're problem is here:
BEGIN
If v_action = "reserve"
THEN
NULL; --Add a NULL here if no other statements
ELSIF (i_slot_to_update = 1)
...
ELSIF i_action = "release"
THEN
NULL; --Add a NULL here if no other statements
ELSIF i_slot_to_update = 1

Stacy

On Thursday 27 October 2005 3:41 pm, McGowan Annamarie wrote:
> I am very new to Oracle Proc's and having a problem with the "then"
> statements when compiling.....can anyone help
>
>
> CREATE OR REPLACE PROCEDURE proc_reserve_slot
> (i_hostname IN NVARCHAR, i_slot_id IN ref_tms_slots.U_SLOT_ID%TYPE,
> i_slot_to_update IN NUMBER,i_action IN VARCHAR,
> o_returncode OUT NUMBER:=0)
>
> AS
>
> BEGIN
> If v_action = "reserve"
> THEN
>
> ELSIF (i_slot_to_update = 1)
> THEN
> update sip_patching where servername = i_hostname set
> u_slot_id_1 = i_slot_id
>
> ELSIF (i_slot_to_update = 2)
> THEN
> update server table where servername = i_hostname set
> u_slot_id_2 = i_slot_id
>
> ELSIF
> THEN
> update ref_tms_slots where i_slot_id = v_slot_id set
> i_servers_assigned = (i_servers_assigned + 1)
>
> ELSIF i_action = "release"
> THEN
>
> ELSIF i_slot_to_update = 1
> THEN
> update server table where servername = i_hostname and
> u_slot_id_1 = i_slot_id set u_slot_id_1 = null
>
> ELSIF v_slot_to_update = 2
> THEN
> update server table where servername = i_hostname and
> u_slot_id_2 = i_slot_id set u_slot_id_2 = null
>
> ELSE
>
> update ref_tms_slots where u_slot_id = i_slot_id set
> i_servers_assigned = (i_servers_assigned - 1)
> END IF;
> END;
> /
>
> Annamarie McGowan
> FISC DC-MMK
> 603-791-7579
> annamarie.[Email address protected]
>
>
>
>
> --------
> website: http://www.LazyDBA.com
> Please don't reply to RTFM questions
> Oracle documentation is here: http://tahiti.oracle.com
> To unsubscribe: see http://www.lazydba.com/unsubscribe.html
> To subscribe: see http://www.lazydba.com
> By using this list you agree to these
> terms:http://www.lazydba.com/legal.html

--
Stacy Gaddy
W-(919)321-0855
C-(910)376-1256
stacy.[Email address protected]

Oracle LazyDBA home page