<jsp:directive.page pageEncoding="UTF-8" />
<!-- 画面リソース⇒ラベルリソース差分追加 -->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
	select A.SYSTEM_ID,A.GUIKEY AS CLM,A.NAME_JA,A.NAME_JA AS SNAME, A.NAME_JA AS LNAME,A.KBSAKU
	from  GEA11 A
	where A.SYSTEM_ID IN ( '{@SYSTEM_ID}','{@BASE}','{@AST}' )
	<og:where startKey="and">
		<og:and value = "A.GUIKEY like '{@CLM}'" />
	</og:where>
--	and	A.KBSAKU	!= '0'
	and	A.FGJ		= '1'
	and not exists (
			select 1 from GEA08 B
			where B.SYSTEM_ID	IN ( '{@SYSTEM_ID}','{@BASE}','{@AST}' )
			and   B.CLM			= A.GUIKEY
--			and   B.KBSAKU		!= '0'
			and   B.FGJ			= '1'
		)
	order by SYSTEM_ID,GUIKEY
</og:query>

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

<og:hidden name="SQL" >
	INSERT INTO GEA08
		(CLM,NAME_JA,SNAME,LNAME,COMMENTS,KBSAKU,SYSTEM_ID,LANG,
		 FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD)
	VALUES
		([CLM],[NAME_JA],[SNAME],[LNAME],'',[KBSAKU],[SYSTEM_ID],'ja',
		 '1','{@USER.YMDH}','{@USER.YMDH}','{@USER.ID}','{@USER.ID}','{@GUI.KEY}')
</og:hidden>

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