[getNowMonth] select to_char(COALESCE(to_date(max(syori_ym)||'01','yyyymmdd') + interval '1 months',now()),'yyyymm') as taisyo_ym from t_getsu_mng [checkCancel] select t1.syori_ym from t_getsu_mng t1 where t1.syori_ym = ':taisyo_ym' and not exists ( select 1 from t_getsu_mng t2 where t2.syori_ym > t1.syori_ym ) [doUpdate] select fnc_update_basv0910(':taisyo_ym', ':login_id') [doCancel] select fnc_update_basv0910_cancel(':taisyo_ym', ':login_id')