<?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" />
<jsp:directive.include file="/jsp/custom/query_info.jsp" />

<og:value command="SET" key="OWNER" value="{@OWNER}" defaultVal="{@SYS.SYSTEM_ID}" />

<og:query command="{@command}" dbid="{@DBID}" scope="request" displayMsg="" notfoundMsg="">
	<jsp:text>
		select COLUMN_NAME as CLM,'' as CONDITION,COLUMN_NAME as VALUE
		from DBA_IND_COLUMNS
		where  INDEX_OWNER = '{@OWNER}'
		and    TABLE_NAME  = '{@TABLE_NAME}'
		and    INSTR(TABLE_NAME,'$') &lt; 1
		group by COLUMN_NAME
		union
		select '' as CLM,'' as CONDITION,'' as VALUE
		from dual
		order by CLM
	</jsp:text>
</og:query>

<og:columnEditor column="CLM" editor="DBMENU" dbid="{@DBID}" scope="request">
	<jsp:text>
		select A.COLUMN_NAME as CLM,NVL(B.LNAME,A.COLUMN_NAME) as LNAME
		from DBA_TAB_COLS A,
			 ( SELECT DISTINCT CLM,LNAME FROM GEA08
				where SYSTEM_ID in ('{@OWNER}','**')
				and   LANG = 'ja'
				and   FGJ  = '1'
			) B
		where  A.COLUMN_NAME = B.CLM(+)
		and    A.OWNER      = '{@OWNER}'
		and    A.TABLE_NAME = '{@TABLE_NAME}'
		and    INSTR(A.TABLE_NAME,'$') &lt; 1
		order by A.TABLE_NAME,A.COLUMN_ID
	</jsp:text>
</og:columnEditor>

<og:columnEditor column="VALUE" editor="COLUMN" scope="request" />

<form method="GET" action="forward.jsp" target="RESULT" onClick="timeSet();">
<table>
  <tr>
	<og:column name="DBID"  size="10" />
	<og:column name="OWNER" defaultVal="{@SYS.SYSTEM_ID}" size="5" />
	<og:select name="TABLE_NAME" value="{@TABLE_NAME}"
		onChange="renew('query.jsp','QUERY');" must="true" >
		<og:option value="" lbl="" />
		<og:queryOption dbid="{@DBID}">
			<jsp:text>
				select OBJECT_NAME,OBJECT_NAME || ':' || B.LNAME as LNAME
				from DBA_OBJECTS ,
					 ( SELECT DISTINCT CLM,LNAME FROM GEA08
						where SYSTEM_ID in ('{@OWNER}','**')
						and   LANG = 'ja'
						and   FGJ  = '1'
					) B
				where  OBJECT_NAME	= B.CLM(+)
				and    OWNER		= '{@OWNER}'
				and    OBJECT_TYPE in ( 'TABLE','VIEW' )
				and    INSTR(OBJECT_NAME,'$') &lt; 1
				group by OBJECT_NAME,B.LNAME
				order by OBJECT_NAME
			</jsp:text>
		</og:queryOption>
	</og:select>
  </tr>
</table>
<og:equals val1="{@TABLE_NAME}" val2="{@TABLE_NAME}" >
<table>
  <tr><td colspan="2" rowspan="4">
<og:view
	command			= "{@command}"
	scope			= "request"
	writable		= "true"
	selectedType	= "hidden"
	columnWritable	= "CLM,CONDITION,VALUE"
	noMessage		= "true"
/>
  </td></tr>
  <tr><og:input name="CLMS"     lbl="CLM" maxlength="100" size="50" value="A.*" />	</tr>
  <tr><og:input name="AND"      lbl="AND" maxlength="100" size="50" />				</tr>
  <tr><og:input name="ORDER_BY" msg="ORDER_BY" maxlength="100" size="50" />		</tr>
</table>
</og:equals>

<jsp:directive.include file="/jsp/common/submitMaxRowQuery.jsp" />
</form>

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