[Home] [Help]
44: ) is
45: --
46: -- Declare cursors and local variables
47: --
48: l_business_group_id per_valid_grades.business_group_id%TYPE;
49: l_proc varchar2(72) := g_package||'create_valid_grade';
50:
51: --
52: --
310: -- job where the end date of the job is earlier than the end
311: -- date of the valid grade.or the previous end dates matched.
312: --
313: --
314: update per_valid_grades vg
315: set vg.date_to =
316: (select least(nvl(p_date_to, to_date('12/31/4712','mm/dd/yyyy')),
317: nvl(g.date_to, to_date('12/31/4712','mm/dd/yyyy')))
318: from per_grades g
346: -- has been made earlier than the start date of the
347: -- valid grade.
348: --
349: --
350: delete from per_valid_grades vg
351: where vg.business_group_id + 0 = p_business_group_id
352: and vg.job_id = p_job_id
353: and vg.date_from > p_date_to;
354: --