ADD_CALENDAR_KEYΒΆ

Add new Calendar Key.

Table: REDADM.RED_CALENDAR_KEYS (Rule definition for calendar keys)

Parameter Name

Properties

Default Value

Parameter Description

p_cal_name

(PK)(NN)

Name of the calendar as defined in column REDADM.RED_CALENDAR_DEFINITIONS.CAL_NAME

p_cal_key

(PK)(NN)

Calendar key that represents the rule

p_description

A description of the calendar key

p_cal_rule

(NN)

Calendar rule. Lua script REDADM.P_RED_REFRESH_CONTROL inserts dates conforming to a rule into table REDADM.RED_CALENDAR_DAYS. One ore more rows are inserted into table RED_CALENDAR_DAYS for a specific date depending on the number of rules satisfied.

p_cal_preferring_clause

An optional PREFERRING clause to restrict dates being inserted into table REDADM.RED_CALENDAR_DAYS. This column is used by function function refresh_time that is part of Lua script REDADM.P_RED_REFRESH_CONTROL.

Example

EXECUTE SCRIPT api_redadm.add_calendar_key
            ( 'XXX'      -- p_cal_name
            , 'XXX'      -- p_cal_key
            , 'XXX'      -- p_description
            , 'XXX'      -- p_cal_rule
            , 'XXX'      -- p_cal_preferring_clause
            );