<jsp:directive.page pageEncoding="UTF-8" />
<!-- コードリソース重複チェック -->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}" >
	select
		CASE WHEN A.UNIQ < B.UNIQ THEN '0' ELSE '1' END AS writable ,
		B.SYSTEM_ID,B.CLM,B.CODE,
		CASE WHEN A.SEQNO != B.SEQNO THEN B.SEQNO ELSE null END AS SEQNO ,
		B.COMMENTS,B.RELEASE_NOTES,B.DYSET, B.KBSAKU , B.UNIQ
	from  GEA04 A inner join GEA04 B
			on    A.SYSTEM_ID = B.SYSTEM_ID
			and   A.CLM       = B.CLM
			and   A.CODE      = B.CODE
			and   A.KBSAKU    = B.KBSAKU
			and   A.UNIQ     != B.UNIQ
	where A.SYSTEM_ID = '{@SYSTEM_ID}'
--	and   A.KBSAKU   != '0'
--	and   B.KBSAKU   != '0'
	and   A.FGJ       = '1'
	and   B.FGJ       = '1'
	order by B.SYSTEM_ID,B.CLM,B.CODE,B.UNIQ
</og:query>

<og:value key="lblKey" value="D" />

<og:hidden name="SQL">
	DELETE FROM GEA04
	WHERE UNIQ      = [UNIQ]
	AND   SYSTEM_ID = [SYSTEM_ID]
	AND   CLM       = [CLM]
	and   CODE      = [CODE]
</og:hidden>

<og:viewLink command="{@command}">
	<og:link column="CLM" gamenId="GE0004" href="index.jsp" target="CONTENTS"
		keys="command,SYSTEM_ID,CLM,CODE,KBSAKU"
		vals="NEW,[SYSTEM_ID],[CLM],[CODE],[KBSAKU]" />
</og:viewLink>
