Difference between revisions of "OE.GET PHONE NUMBER F (function)"

From dbscript Online Help
Jump to: navigation, search
 
Line 2: Line 2:
  
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
|-
+
|- valign="top"
 
| '''Function
 
| '''Function
 
| OE.GET_PHONE_NUMBER_F
 
| OE.GET_PHONE_NUMBER_F
|-
 
 
|}
 
|}
 
  
 
=== Source ===
 
=== Source ===

Latest revision as of 06:15, 24 June 2010

wikibot[edit]

Function OE.GET_PHONE_NUMBER_F

Source[edit]

CREATE OR REPLACE FUNCTION get_phone_number_f
  (p_in INTEGER, p_phonelist phone_list_typ)
RETURN VARCHAR2 AS
  TYPE phone_list IS VARRAY(5) OF VARCHAR2(25);
  phone_out varchar2(25) := null;
  v_size INTEGER;
BEGIN
    IF p_phonelist.FIRST IS NULL OR
       p_in > (p_phonelist.LAST + 1) - p_phonelist.FIRST THEN
      RETURN phone_out;
    ELSE
      phone_out := p_phonelist(p_in);
      RETURN phone_out;
    END IF;
END;