Main Tables Views Indexes Constraints Triggers Procedures Functions Packages Sanity check Index

ACS3 Data Model

Arguments Source

BBOARD_CONTAINS

Arguments:

NameData TypeDefault ValueIn/Out
EMAILVARCHAR2 IN
NAMEVARCHAR2 IN
ONE_LINEVARCHAR2 IN
MESSAGECLOB IN
SPACE_SEP_LIST_UNTRIMMEDVARCHAR2 IN

Returns:

INTEGER(38.0)

Source

Source
     1: function bboard_contains (email IN varchar, name IN varchar, one_line IN varchar, message IN clob, space_sep_list_untrimmed IN varchar)
     2: return integer
     3: IS
     4:   space_sep_list        varchar(32000);
     5:   upper_indexed_stuff   varchar(32000);
     6:   -- if you call this var START you get hosed royally
     7:   first_space           integer;
     8:   score                 integer;
     9: BEGIN
    10:   space_sep_list := upper(ltrim(rtrim(space_sep_list_untrimmed)));
    11:   upper_indexed_stuff := upper(email || name || one_line || dbms_lob.substr(message,30000));
    12:   score := 0;
    13:   IF space_sep_list is null or upper_indexed_stuff is null THEN
    14:     RETURN score;
    15:   END IF;
    16:   LOOP
    17:    first_space := instr(space_sep_list,' ');
    18:    IF first_space = 0 THEN
    19:      -- one token or maybe end of list
    20:      IF instr(upper_indexed_stuff,space_sep_list) <> 0 THEN
    21:         RETURN score+10;
    22:      END IF;
    23:      RETURN score;
    24:    ELSE
    25:    -- first_space <> 0
    26:      IF instr(upper_indexed_stuff,substr(space_sep_list,1,first_space-1)) <> 0 THEN
    27:         score := score + 10;
    28:      END IF;
    29:    END IF;
    30:     space_sep_list := substr(space_sep_list,first_space+1);
    31:   END LOOP;
    32: END bboard_contains;


Generated by OraSchemaDoc, (c) Aram Kananov, 2002