update afr3161 set
    jan = :jan,
	ijan = :ijan,
	cst = :cst,
	chgcd = :chgcd,
	dat = :dat,
	pno1 = :pno,
	togyo = :lcnt,
	pno = decode(:cls1,'8',nvl(:wpno,0),0),
	pno9 = decode(:cls1,'8',0,nvl(:wpno,0)),
	cls1 = :cls1,
	flg = 1
where iseq = :iseq
 and ktktcd = :ktktcd
 and spktcd = :spktcd
