select
	iseq,
	ypno as pno,
	cst,
	com1,
	to_char(cdat, 'yyyy/mm') as cdat
from afr3127
where cls='2' and sts='0'
	and ijan=:ijan
	and nvl(cdat,to_date('19000101','yyyymmdd'))=nvl(to_date(:cdat,'yy/mm'),to_date('19000101','yyyymmdd'))
	and ktktcd=:ktktcd
	and spktcd=:spktcd
	and rownum=1
