<jsp:directive.page pageEncoding="UTF-8" />
<!-- 読込ﾌﾗｸﾞ更新 -->
<!-- ﾗﾍﾞﾙﾘｿｰｽのKBLBLが、2:ﾃｰﾌﾞﾙ と、5:ﾌﾟﾛｸﾞﾗﾑ は、FGLOADを 0:個別読込 にし、それ以外は、1:一括読込 にします。-->
<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}">
	select SYSTEM_ID,CLM,
			case when KBLBL in ( '1','3','4' ) then '1' else '0' end as FGLOAD ,
			UNIQ
	from   GEA08
	where  SYSTEM_ID = '{@SYSTEM_ID}'
	and    FGJ       = '1'
	and    case when KBLBL in ( '1','3','4' ) then '1' else '0' end != FGLOAD
</og:query>

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

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