<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld"
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />

<!-- タグリブ⇒ラベルリソース名称更新 -->
<!-- VerNoの最大値を求めます。 GF21 が一番件数が少ない。 -->
<og:value command="SQL">
	select max(VERNO) as MAXVERNO from GF21
</og:value>

<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}" stopZero="true">
	select A.CLM,A.DESCRIPTION AS BEFORE,'{@ARROW}',max(B.DESCRIPTION) AS AFTER
	from GEA08 A inner join GF24 B
		 on A.CLM     =  B.VALUENAME
	where B.VERNO     = '{@MAXVERNO}'
	and   A.SYSTEM_ID = 'GF'
	and   A.LANG      = 'ja'
	and   A.KBSAKU    = '1'
	and   A.KBLBL     = 'A'
	and   A.FGJ       = '1'
	group by A.CLM,A.DESCRIPTION
	having max(B.DESCRIPTION) != A.DESCRIPTION
</og:query>

<og:hidden name="names" value="," />
<og:hidden name="SQL">
	UPDATE GEA08 SET
			DESCRIPTION = [AFTER],
			DYUPD       = '{@USER.YMDH}',
			USRUPD      = '{@USER.ID}',
			PGUPD       = '{@GUI.KEY}'
	WHERE SYSTEM_ID = 'GF'
	AND   CLM       = [CLM]
	AND   LANG      = 'ja'
	AND   KBSAKU    = '1'
	AND   KBLBL     = 'A'
	AND   FGJ       = '1'
</og:hidden>
</jsp:root>
