<og:query command="{@command}" debug="{@debug}" maxRowCount="10000" stopZero="true">
	select	TABLE_NAME,NAME_JA,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   FGJ in ('0','1')
	and   TABLE_NAME in (
		select TABLE_NAME from (
			select	TABLE_NAME
			from GF80
			where SYSTEM_ID  = '{@SYSTEM_ID}'
			and   TBLSYU     = '3'
			and   FGJ in ('0','1')
			group by TABLE_NAME,NAME_JA
		) B
		group by TABLE_NAME
		having count(*) > 1
	)
	group by TABLE_NAME,NAME_JA,SYSTEM_ID
	order by TABLE_NAME,CNT,SYSTEM_ID
</og:query>

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

<og:hidden name="noWritable">SYSTEM_ID,TABLE_NAME,CNT</og:hidden>
