<og:value command="SQL" >
	select	count(*) AS CNT
	from GF80
	where SYSTEM_ID  = '{@SYSTEM_ID}'
	and   TBLSYU     = '3'
	and   TABLE_NAME like '{@TABLE_NAME}%'
	and   CLM        like '{@CLM}%'
	and   FGJ in ('0','1')
</og:value>

<og:text>{@LBL.CNT_READ} {@CNT} {@LBL.MSG0033}</og:text><br />

<og:query command="{@command}" debug="{@debug}" maxRowCount="10000" stopZero="true">
	select	CLM,CLM_NAME,BIKO,
			count(*) AS CNT,SYSTEM_ID,'' AS UNIQ,'1' AS FGJ
	from GF80
	where SYSTEM_ID  = '{@SYSTEM_ID}'
	and   TBLSYU     = '3'
	and   TABLE_NAME like '{@TABLE_NAME}%'
	and   CLM        like '{@CLM}%'
	and   FGJ in ('0','1')
	and   CLM in (
		select CLM from (
			select	CLM,BIKO
			from GF80
			where SYSTEM_ID  = '{@SYSTEM_ID}'
			and   TBLSYU     = '3'
			and   FGJ in ('0','1')
			group by CLM,BIKO
		) B
		group by CLM
		having count(*) > 1
	)
	group by CLM,CLM_NAME,BIKO,SYSTEM_ID
	order by CLM,CLM_NAME,BIKO,SYSTEM_ID
</og:query>

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

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