update t_tpo_declare_main_tsd set fdeadline ='aysb' where ftemplatetype in ('draft_zzsybnsr','draft_zzsxgmnsr','draft_zzsybnsr_ybhz','draft_qysdsjb','draft_zzsybnsr_sjjt','draft_zzsybnsr_ybhz_sjjt','draft_zzsybnsr_hz_zjg_sjjt','draft_zzsxgmnsr_sjjt','draft_zzsybnsr_yz_zjg_sjjt') and (fdeadline is NULL or fdeadline=' ') and MONTH(fskssqq)=MONTH(fskssqz) ;
update t_tpo_declare_main_tsd set fdeadline ='ajsb' where ftemplatetype in ('draft_zzsybnsr','draft_zzsxgmnsr','draft_zzsybnsr_ybhz','draft_qysdsjb','draft_zzsybnsr_sjjt','draft_zzsybnsr_ybhz_sjjt','draft_zzsybnsr_hz_zjg_sjjt','draft_zzsxgmnsr_sjjt','draft_zzsybnsr_yz_zjg_sjjt') and (fdeadline is NULL or fdeadline=' ') and MONTH(fskssqq)=MONTH(fskssqz)-2;

/**pg语法**/
 --extract(month from fskssqq)=extract (month from fskssqz);
 --extract(month from fskssqq)=extract(month from fskssqz)-2;
