create or replace package MIP_ENQUIRY is -- Author : PRIESTJ -- Created : 15/11/2007 14:18:24 -- Purpose : Provides useful admin functions/procedures for enquiries -- Public function and procedure declarations FUNCTION set_enquiry_role(p_enquiryid in number,p_partyid in number,p_rolecode IN VARCHAR2) RETURN boolean; end MIP_ENQUIRY; / create or replace package body MIP_ENQUIRY is /* FUNCTION set_enquiry_role - gets the enquiry id, party id and the role type and writes a record in the enquiry_roles table - allowing you to assign agents, suppliers etc. to an enquiry. %param p_enquiryid - the current enquiry to save the role against. %param p_partyid - the user or party to assign to this role. %param p_rolecode - what kind of role this will be. */ FUNCTION set_enquiry_role(p_enquiryid in number,p_partyid in number,p_rolecode IN VARCHAR2) RETURN boolean as begin INSERT INTO enquiry_roles (enqu_id, prty_id, rt_code) VALUES (p_enquiryid, p_partyid, p_rolecode); return TRUE; -- EXCEPTION -- edit this to check for a 'unable to write record' -- only and just pass on all other exceptions WHEN OTHERS THEN return FALSE; RAISE; end set_enquiry_role; end MIP_ENQUIRY; /