<jsp:directive.page pageEncoding="UTF-8" />
<!-- コードリソース重複チェック 作成区分 除外 -->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
	select
		CASE WHEN B.KBSAKU < A.KBSAKU THEN '0' ELSE '1' END AS writable ,
		B.CLM,B.CODE,
		CASE WHEN     A.SEQNO            !=     B.SEQNO            THEN B.SEQNO      ELSE null END AS SEQNO ,
		CASE WHEN nvl(A.CODEGRP    ,'x') != nvl(B.CODEGRP    ,'x') THEN B.CODEGRP    ELSE ''   END AS CODEGRP ,
		CASE WHEN nvl(A.CODE_PARAM ,'x') != nvl(B.CODE_PARAM ,'x') THEN B.CODE_PARAM ELSE ''   END AS CODE_PARAM ,
		CASE WHEN nvl(A.ROLES      ,'x') != nvl(B.ROLES      ,'x') THEN B.ROLES      ELSE ''   END AS ROLES ,
		A.SYSTEM_ID, A.KBSAKU , B.SYSTEM_ID, B.KBSAKU , B.UNIQ
	from  GEA04 A inner join GEA04 B
			on    A.SYSTEM_ID in ( B.SYSTEM_ID , '**' )
			and   A.CLM       = B.CLM
			and   A.CODE      = B.CODE
			and   A.UNIQ     != B.UNIQ
			and   A.KBSAKU   != B.KBSAKU
	where B.SYSTEM_ID = '{@SYSTEM_ID}'
	and   A.FGJ       = '1'
	and   B.FGJ       = '1'
	order by B.SYSTEM_ID,B.CLM,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"
		vals="NEW,[SYSTEM_ID],[CLM],[CODE]" />
</og:viewLink>
