User Tools

Site Tools


kurs:ultimo_vormonat
create or replace
FUNCTION ULTIMO_VORMONAT
(datum IN date)
 RETURN DATE is 
 v_ultimo date;
BEGIN  
  select ultimo into v_ultimo from ultimo_as where
          jahr  = 
          extract(year from datum - to_yminterval('0-1')) and
          monat = 
          extract(month from datum -to_yminterval('0-1'));
  RETURN v_ultimo;
END;
kurs/ultimo_vormonat.txt · Last modified: 2014/09/10 21:22 (external edit)