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

From dbscript Online Help
Jump to: navigation, search
Line 3: Line 3:
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|-
 
|-
| '''function
+
| '''Function
 
| OE.GET_PHONE_NUMBER_F
 
| OE.GET_PHONE_NUMBER_F
 
|-
 
|-
Line 9: Line 9:
  
  
 +
=== Source ===
 
<pre>
 
<pre>
 
CREATE OR REPLACE FUNCTION get_phone_number_f
 
CREATE OR REPLACE FUNCTION get_phone_number_f

Revision as of 08:27, 11 February 2010

wikibot

Function OE.GET_PHONE_NUMBER_F


Source

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;