<jsp:directive.page pageEncoding="UTF-8" />
<!-- カラムリソース⇒ラベルリソース差分追加 -->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
	select SYSTEM_ID,CLM,NAME_JA
	from  GEA03
	where SYSTEM_ID = '{@SYSTEM_ID}'
	<og:where startKey="and">
		<og:and value = "CLM like '{@CLM}'" />
	</og:where>
	and   KBSAKU   != '0'
	and   FGJ       = '1'
	and not exists (
			select * from GEA08 B
			where B.SYSTEM_ID  = '{@SYSTEM_ID}'
			and   ( B.CLM      = GEA03.CLM       or
					B.CLM      = GEA03.LABEL_CLM  )
			and   B.LANG       = 'ja'
			and   B.KBSAKU    != '0'
			and   B.FGJ        = '1'
		)
	order by SYSTEM_ID,CLM
</og:query>

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

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