insert into afr3161 (
  ktktcd,spktcd,cls,cls1,tono,togyo,
  vend,jan,ijan,iloc,
  cst,pno1,pno,pno9,chgcd,flg
) values (
  :ktktcd,:spktcd,'61',:cls1,:vseq,:lcnt,
  '90000',:jan,:ijan,:iloc,
  :cst,:pno,decode(:cls1,'8',nvl(:wpno,0),0),decode(:cls1,'8',0,nvl(:wpno,0)),:chgcd,1
)