37:
38: BEGIN
39: SELECT period_name
40: INTO low_period_name
41: FROM gl_date_period_map
42: WHERE period_set_name = calendar_name
43: AND period_type = get_num_periods_in_date_range.period_type
44: AND accounting_date = start_date;
45:
55:
56: BEGIN
57: SELECT period_name
58: INTO high_period_name
59: FROM gl_date_period_map
60: WHERE period_set_name = calendar_name
61: AND period_type = get_num_periods_in_date_range.period_type
62: AND accounting_date = end_date;
63:
76: ) THEN
77: BEGIN
78: SELECT min(accounting_date)
79: INTO unmapped_date
80: FROM gl_date_period_map
81: WHERE period_set_name = calendar_name
82: AND period_type = get_num_periods_in_date_range.period_type
83: AND accounting_date between start_date and end_date
84: AND period_name = 'NOT ASSIGNED';