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]
Oracle LazyDBA home page