<?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="GF82" lbl="GF82" />
	</og:select>
	<og:select name="ACTION" lbl="Action">
		<og:option value="MINUS"      lbl="MINUS"      />
		<og:option value="INTERSECT"  lbl="INTERSECT"  />
		<og:option value="UNION_ALL"  lbl="UNION_ALL"  />
		<og:option value="UNION"      lbl="UNION"      />
		<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">
			<!-- 項目が一つの queryOption では、ラベルリソースが使用されます。 -->
			<og:queryOption>
				<jsp:text>
					select COLUMN_NAME
					from USER_TAB_COLUMNS
					where  TABLE_NAME = '{@TABLE_NAME}'
					and COLUMN_NAME not in ('SYSTEM_ID','TBLSYU','UNIQ','USRSET','USRUPD','DYSET','DYUPD','COMMENTS','FGCOM','FGJ')
					order by TABLE_NAME,COLUMN_ID
				</jsp:text>
			</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>
				<jsp:text>
					select COLUMN_NAME
					from USER_TAB_COLUMNS
					where  TABLE_NAME = '{@TABLE_NAME}'
					and COLUMN_NAME not in ('SYSTEM_ID','TBLSYU','UNIQ','USRSET','USRUPD','DYSET','DYUPD','COMMENTS','FGCOM','FGJ')
					order by TABLE_NAME,COLUMN_ID
				</jsp:text>
			</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" >
					<og:queryOption>
						<jsp:text>
							select SYSTEM_ID from {@TABLE_NAME} group by SYSTEM_ID order by SYSTEM_ID
						</jsp:text>
					</og:queryOption>
				</og:select>
			</og:equals>
		  </tr><tr>
			<og:column name="TBLSYU1" lbl="TBLSYU" must="true" codeName="TBLSYU" addNoValue="false" />
		  </tr><tr>
			<og:column name="TABLE_NAME1" lbl="TABLE_NAME" 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" >
					<og:queryOption>
						<jsp:text>
							select SYSTEM_ID from {@TABLE_NAME} group by SYSTEM_ID order by SYSTEM_ID
						</jsp:text>
					</og:queryOption>
				</og:select>
			</og:equals>
		  </tr><tr>
			<og:column name="TBLSYU2" lbl="TBLSYU" must="true" codeName="TBLSYU" addNoValue="false" />
		  </tr><tr>
			<og:column name="TABLE_NAME2" lbl="TABLE_NAME" colspan="3" />
		  </tr>
		</table>
	</fieldset>
	</td>
	</tr>
</table>

<og:queryButton />
</form>

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