<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
	select	CLM,NAME_JA,BIKO,
			count(*) AS CNT,SYSTEM_ID,'' AS UNIQ,'1' AS FGJ
	from GF05
	where SYSTEM_ID  = '{@SYSTEM_ID}'
	and   TBLSYU     = '{@TBLSYU}'
	and   FGJ in ('0','1')
	and   CLM in (
		select CLM from (
			select	CLM,BIKO
			from GF05
			where SYSTEM_ID  = '{@SYSTEM_ID}'
			and   TBLSYU     = '{@TBLSYU}'
			and   FGJ in ('0','1')
			group by CLM,BIKO
		)
		group by CLM
		having count(*) > 1
	)
	group by CLM,NAME_JA,BIKO,SYSTEM_ID
	order by CLM,NAME_JA,BIKO,SYSTEM_ID
</og:query>

<og:hidden name="SQL" >
  <jsp:text>
	UPDATE GF05 SET
			BIKO	 		= [BIKO],
			CDKH			= 'C',
			FGJ				= '1',
			DYUPD			= '{@USER.YMDH}',
			USRUPD			= '{@USER.ID}',
			PRGUPD			= '{@GUI.KEY}'
	WHERE SYSTEM_ID	= [SYSTEM_ID]
	AND CLM			= [CLM]
	AND TBLSYU		= '{@TBLSYU}'
	AND FGJ			IN ('0','1')
  </jsp:text>
</og:hidden>

<og:hidden name="noWritable">CNT</og:hidden>