<jsp:directive.page pageEncoding="UTF-8" />
<!-- ラベル区分更新 -->
<!-- 画面ﾘｿｰｽのGUILVL が、3:通常 の場合は、KBLBLを、3:画面 にし、それ以外は、4:画面分類 にします。 -->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
	select A.SYSTEM_ID,A.GUIKEY as CLM ,
			case A.GUILVL when '3' then '3' else '4' end as KBLBL
	from   GEA11 A inner join GEA08 B
			on  A.SYSTEM_ID = B.SYSTEM_ID
			and A.GUIKEY    = B.CLM
			and case A.GUILVL when '3' then '3' else '4' end != B.KBLBL
	where  A.SYSTEM_ID = '{@SYSTEM_ID}'
	and    A.FGJ       = '1'
	and    B.FGJ       = '1'
</og:query>

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

<og:hidden name="SQL">
	UPDATE GEA08 SET
			KBLBL   = [KBLBL],
			DYUPD   = '{@USER.YMDH}',
			USRUPD  = '{@USER.ID}',
			PGUPD   = '{@GUI.KEY}'
	WHERE SYSTEM_ID = [SYSTEM_ID]
	AND   CLM       = [CLM]
</og:hidden>
