<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,
		CASE WHEN nvl(A.NAME_JA   ,'x') != nvl(B.NAME_JA   ,'x') THEN A.NAME_JA    || '→' || B.NAME_JA    ELSE '' END AS NAME_JA ,
		CASE WHEN nvl(A.CLS_NAME  ,'x') != nvl(B.CLS_NAME  ,'x') THEN A.CLS_NAME   || '→' || B.CLS_NAME   ELSE '' END AS CLS_NAME ,
		CASE WHEN nvl(A.USE_LENGTH,'x') != nvl(B.USE_LENGTH,'x') THEN A.USE_LENGTH || '→' || B.USE_LENGTH ELSE '' END AS USE_LENGTH ,
		CASE WHEN nvl(A.RENDERER  ,'x') != nvl(B.RENDERER  ,'x') THEN A.RENDERER   || '→' || B.RENDERER   ELSE '' END AS RENDERER ,
		CASE WHEN nvl(A.EDITOR    ,'x') != nvl(B.EDITOR    ,'x') THEN A.EDITOR     || '→' || B.EDITOR     ELSE '' END AS EDITOR ,
		CASE WHEN nvl(A.DBTYPE    ,'x') != nvl(B.DBTYPE    ,'x') THEN A.DBTYPE     || '→' || B.DBTYPE     ELSE '' END AS DBTYPE ,
		A.SYSTEM_ID, A.KBSAKU , B.SYSTEM_ID, B.KBSAKU , B.UNIQ
	from  GEA03 A inner join GEA03 B
					on    A.SYSTEM_ID in ( '{@SYSTEM_ID}' , '**' )
					and   A.CLM       = B.CLM
					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 GEA03
	WHERE UNIQ      = [UNIQ]
	AND   SYSTEM_ID = [SYSTEM_ID]
	AND   CLM       = [CLM]
</og:hidden>

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