<jsp:directive.page pageEncoding="UTF-8" />
<!-- ラベルリソース重複チェック 作成区分 除外 -->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
	select
		B.CLM,B.LANG,
		CASE WHEN COALESCE(A.NAME_JA,'x') != COALESCE(B.NAME_JA,'x') THEN B.NAME_JA || '→' || A.NAME_JA ELSE '' END AS NAME_JA ,
		CASE WHEN COALESCE(A.SNAME  ,'x') != COALESCE(B.SNAME  ,'x') THEN B.SNAME   || '→' || A.SNAME   ELSE '' END AS SNAME ,
		CASE WHEN COALESCE(A.LNAME  ,'x') != COALESCE(B.LNAME  ,'x') THEN B.LNAME   || '→' || A.LNAME   ELSE '' END AS LNAME ,
		B.KBSAKU || '→' || A.KBSAKU as KBSAKU ,
		B.SYSTEM_ID || '→' || A.SYSTEM_ID as SYSTEM_ID ,
		B.SYSTEM_ID AS F_SYSTEM_ID, B.UNIQ
	from  GEA08 A inner join GEA08 B
			on    A.SYSTEM_ID = '**'
			and   B.SYSTEM_ID = '{@SYSTEM_ID}'
			and   A.CLM       = B.CLM
			and   A.LANG      = B.LANG
			or    B.FGJ       = '9'
	where B.SYSTEM_ID = '{@SYSTEM_ID}'
	<og:where startKey="and">
		<og:and value = "A.CLM like '{@CLM}'" />
	</og:where>
	and   A.FGJ       = '1'
	and   B.FGJ       = '1'
	order by B.SYSTEM_ID,B.CLM,B.KBSAKU,B.UNIQ
</og:query>

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

<og:hidden name="SQL">
	DELETE FROM GEA08
	WHERE UNIQ      = [UNIQ]
	AND   SYSTEM_ID = [F_SYSTEM_ID]
	AND   LANG      = [LANG]
	AND   CLM       = [CLM]
</og:hidden>

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