<?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" />

<og:head headType="query" />
<jsp:directive.include file="/jsp/custom/query_info.jsp" />
<og:comment
	system	= "GF:エンジンサンプル"
	pgid	= "GF2090"
	title	= "テーブル差分"
	date	= "2008/10/27"
	author	= "Hiroki.Nakamura"
	text	= ""
	version	= "001"
/>

<form method="GET" action="forward.jsp" target="RESULT" onClick="timeSet();">
<table summary="layout" >
  <tr>
	<og:select name="TABLE_NAME" value="{@TABLE_NAME}"
		onChange="renew('query.jsp','QUERY');" must="true" >
		<og:option value=""     lbl=""     />
		<og:option value="GF02" lbl="GF02" />
		<og:option value="GF05" lbl="GF05" />
		<og:option value="GF06" lbl="GF06" />
		<og:option value="GF07" lbl="GF07" />
		<og:option value="GF09" lbl="GF09" />
		<og:option value="GF80" lbl="GF80" />
		<og:option value="GF81" lbl="GF81" />
		<og:option value="GF82" lbl="GF82" />
		<og:option value="GF83" lbl="GF83" />
		<og:option value="GF84" lbl="GF84" />
		<og:option value="GF85" lbl="GF85" />
	</og:select>
	<og:select name="ACTION" lbl="Action" must="true">
		<og:option value="MINUS"      lbl="MINUS"      />
		<og:option value="DIFFERENCE" lbl="DIFFERENCE" />
	</og:select>
	<og:equals val1="{@TABLE_NAME}" val2="{@TABLE_NAME}" >
	  <td rowspan="2">
		<og:text>{@LBL.COMPARE_KEYS}</og:text><br />
		<og:select name="compareKeys" lbl="COMPARE_KEYS" multiple="multiple" size="7" td="false" must="true">
			<!-- 項目が一つの queryOption では、ラベルリソースが使用されます。 -->
			<og:queryOption>
				select CLM
				from GF05
				where  TABLE_NAME = '{@TABLE_NAME}'
				and    SYSTEM_ID  = 'GF'
				and    TBLSYU     = 'D'
				and    CLM not in ('SYSTEM_ID','TBLSYU')
		--		and    FGCOM      &lt;  '5'
				order by TABLE_NAME,SEQNO,CLM
			</og:queryOption>
		</og:select>
	  </td>
	  <td rowspan="2">
		<og:text>{@LBL.DIFF_KEYS}</og:text><br />
		<og:select name="diffKeys" lbl="DIFF_KEYS" multiple="multiple" size="7" td="false">
			<!-- 項目が一つの queryOption では、ラベルリソースが使用されます。 -->
			<og:queryOption>
				select CLM
				from GF05
				where  TABLE_NAME = '{@TABLE_NAME}'
				and    SYSTEM_ID  = 'GF'
				and    TBLSYU     = 'D'
				and    CLM not in ('SYSTEM_ID','TBLSYU')
		--		and    FGCOM      &lt;  '5'
				order by TABLE_NAME,SEQNO,CLM
			</og:queryOption>
		</og:select>
	  </td>
	  <td rowspan="2">
		<og:text>{@LBL.MODIFY_KEYS}</og:text><br />
		<og:select name="modifyKeys" lbl="DIFF_KEYS" multiple="multiple" size="7" td="false">
			<!-- 項目が一つの queryOption では、ラベルリソースが使用されます。 -->
			<og:queryOption>
				select CLM
				from GF05
				where  TABLE_NAME = '{@TABLE_NAME}'
				and    SYSTEM_ID  = 'GF'
				and    TBLSYU     = 'D'
				and    CLM not in ('SYSTEM_ID','TBLSYU')
		--		and    FGCOM      &lt;  '5'
				order by TABLE_NAME,SEQNO,CLM
			</og:queryOption>
		</og:select>
	  </td>
	</og:equals>
  </tr>

  <tr><td colspan="2" >
	<fieldset style="display:inline;">
		<legend><strong><og:message lbl="HIKAKU_MOTO" /></strong></legend>
		<table>
		  <tr>
			<og:equals val1="{@TABLE_NAME}" val2="{@TABLE_NAME}" >
				<og:select name="SYSTEM_ID1" lbl="SYSTEM_ID" must="true" defaultVal="{@NVL.LAST.SYSTEM_ID1 @LAST.SYSTEM_ID}" >
					<og:queryOption>
						select SYSTEM_ID from {@TABLE_NAME} group by SYSTEM_ID order by SYSTEM_ID
					</og:queryOption>
				</og:select>
			</og:equals>
		  </tr><tr>
			<og:column name="TBLSYU1" lbl="TBLSYU" must="true" codeName="TBLSYU" addNoValue="false" defaultVal="D" />
		  </tr><tr>
			<og:column name="TABLE_NAME1" lbl="TABLE_NAME" colspan="3"/>
		  </tr><tr>
			<og:column name="WHERE1" lbl="WHERE" colspan="3"/>
		  </tr>
		</table>
	</fieldset>
	</td><td colspan="2" >
	<fieldset style="display:inline;">
		<legend><strong><og:message lbl="HIKAKU_SAKI" /></strong></legend>
		<table>
		  <tr>
			<og:equals val1="{@TABLE_NAME}" val2="{@TABLE_NAME}" >
				<og:select name="SYSTEM_ID2" lbl="SYSTEM_ID" must="true" defaultVal="{@NVL.LAST.SYSTEM_ID2 @LAST.SYSTEM_ID}" >
					<og:queryOption>
						select SYSTEM_ID from {@TABLE_NAME} group by SYSTEM_ID order by SYSTEM_ID
					</og:queryOption>
				</og:select>
			</og:equals>
		  </tr><tr>
			<og:column name="TBLSYU2" lbl="TBLSYU" must="true" codeName="TBLSYU" addNoValue="false" defaultVal="T" />
		  </tr><tr>
			<og:column name="TABLE_NAME2" lbl="TABLE_NAME" colspan="3" />
		  </tr><tr>
			<og:column name="WHERE2" lbl="WHERE" colspan="3"/>
		  </tr>
		</table>
	</fieldset>
	</td>
	</tr>
</table>

<og:queryButton />
</form>

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
