<?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="result" />
<jsp:directive.include file="/jsp/custom/result_info.jsp" />
<og:comment
	system	= "GF:エンジンサンプル"
	pgid	= "GF2140"
	title	= "DBスクリプト作成"
	date	= "2008/10/27"
	author	= "Hiroki.Nakamura"
	text	= ""
	version	= "001"
>
	5.5.1.6 (2012/04/16)  USE_LENGTH
</og:comment>

<og:columnCheck
	command   = "{@command}"
/>

<og:value command="SET" key="BASE_DIR" value="{@SYS.REAL_PATH}{@SYS.FILE_URL}{@USER.ID}/{@SYSTEM_ID}{@TYPE}" />

<table border="1" frame="box" rules="all" >

<og:equals val1="{@TABLE}" val2="true" >
 <tr>
  <td>GF02</td>
  <td>
	<og:link gamenId="GF2010" href="index.jsp" target="CONTENTS" lbl="GF02"
		keys="SYSTEM_ID,TBLSYU,FGJ,TABLE_NAME,command" vals="{@SYSTEM_ID},{@TBLSYU},1,{@NAME},NEW" />
  </td>
  <td>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="0">
		select SYSTEM_ID,TBLSYU,TABLE_NAME,NAME_JA,TABLESPACE_NAME,INITIAL_EXTENT,NEXT_EXTENT,COMMENTS
		from GF02
		where SYSTEM_ID = '{@SYSTEM_ID}'
		and   TBLSYU    = '{@TBLSYU}'
		and   FGJ       = '1'
		<og:where startKey="and">
			<og:and value="TABLE_NAME like '{@NAME}%'" />
		</og:where>
		order by TABLE_NAME
	</og:query>
  </td>
  <td width="70px" class="S9">
	<og:value command="GET" key="DB.COUNT" />
  </td>
	<og:equals val1="{@DB.COUNT}" val2="0" notEquals="true" >
		<og:tableFilter classId="TABLE{@TYPE}" keys="dir,XML" vals="{@BASE_DIR}/sql/01_TABLE,false" />
  		<td><og:text>/sql/01_TABLE</og:text></td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="TABLE{@TYPE}" keys="dir,XML" vals="{@BASE_DIR}/xml/install/01_TABLE,true" />
			<td><og:text>/xml/install/01_TABLE</og:text></td>
		</og:equals>
	</og:equals>
 </tr>
</og:equals>

<og:equals val1="{@INDEX}" val2="true" >
 <tr>
  <td>GF06</td>
  <td>
	<og:link gamenId="GF2030" href="index.jsp" target="CONTENTS" lbl="GF06"
		keys="SYSTEM_ID,TBLSYU,FGJ,TABLE_NAME,command" vals="{@SYSTEM_ID},{@TBLSYU},1,{@NAME},NEW" />
  </td>
  <td>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="0">
		select A.SYSTEM_ID,A.TBLSYU,A.TABLE_NAME,B.NAME_JA AS TABLE_LABEL,A.INDEX_NAME,A.NAME_JA,A.INDTYPE,
				A.TABLESPACE_NAME,A.INITIAL_EXTENT,A.NEXT_EXTENT
		from GF06 A left outer join GF02 B
		on      A.SYSTEM_ID  = B.SYSTEM_ID
		and     A.TBLSYU     = B.TBLSYU
		and     A.TABLE_NAME = B.TABLE_NAME
		and     B.FGJ        = '1'
		where A.SYSTEM_ID = '{@SYSTEM_ID}'
		and   A.TBLSYU    = '{@TBLSYU}'
		and   A.FGJ       = '1'
		<og:where startKey="and">
			<og:and value="A.TABLE_NAME like '{@NAME}%'" />
		</og:where>
		order by A.TABLE_NAME,A.INDTYPE,A.INDEX_NAME
	</og:query>
  </td>
  <td width="70px" class="S9">
	<og:value command="GET" key="DB.COUNT" />
  </td>
	<og:equals val1="{@DB.COUNT}" val2="0" notEquals="true" >
		<og:tableFilter classId="INDEX{@TYPE}" keys="dir,XML" vals="{@BASE_DIR}/sql/02_INDEX,false" />
		<td><og:text>/sql/02_INDEX</og:text></td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="INDEX{@TYPE}" keys="dir,XML" vals="{@BASE_DIR}/xml/install/02_INDEX,true" />
			<td><og:text>/xml/install/02_INDEX</og:text></td>
		</og:equals>
	</og:equals>
 </tr>
</og:equals>

<og:equals val1="{@SEQ}" val2="true" >
 <tr>
  <td>GF09</td>
  <td>
	<og:link gamenId="GF2082" href="index.jsp" target="CONTENTS" lbl="GF09"
		keys="SYSTEM_ID,TBLSYU,FGJ,SEQNAME,command" vals="{@SYSTEM_ID},{@TBLSYU},1,{@NAME},NEW" />
  </td>
  <td>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="0">
		select SYSTEM_ID,TBLSYU,SEQNAME,INCREBY,STARTVAL,MINVAL,MAXVAL,FGCYCLE,SUCACHE
		from GF09
		where SYSTEM_ID = '{@SYSTEM_ID}'
		and   TBLSYU    = '{@TBLSYU}'
		and   FGJ       = '1'
		<og:where startKey="and">
			<og:and value="SEQNAME like '{@NAME}%'" />
		</og:where>
		order by SEQNAME
	</og:query>
  </td>
  <td width="70px" class="S9">
	<og:value command="GET" key="DB.COUNT" />
  </td>
	<og:equals val1="{@DB.COUNT}" val2="0" notEquals="true" >
		<og:tableFilter classId="SEQUENCE{@TYPE}" keys="dir,XML" vals="{@BASE_DIR}/sql/03_SEQ,false" />
		<td><og:text>/sql/03_SEQ</og:text></td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="SEQUENCE{@TYPE}" keys="dir,XML" vals="{@BASE_DIR}/xml/install/03_SEQ,true" />
			<td><og:text>/xml/install/03_SEQ</og:text></td>
		</og:equals>
	</og:equals>
 </tr>
</og:equals>

<og:equals val1="{@ARG}" val2="true" >
 <tr>
  <td>GF81</td>
  <td>
	<og:link gamenId="GF2070" href="index.jsp" target="CONTENTS" lbl="GF81"
		keys="SYSTEM_ID,TBLSYU,FGJ,command" vals="{@SYSTEM_ID},{@TBLSYU},1,NEW" />
  </td>
  <td>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="0">
		select SYSTEM_ID,TBLSYU,OBJ_NAME,SEQNO,CLM,CLM_NAME,CLS_NAME,USE_LENGTH,MAX_LENGTH,TABLE_NAME
		from GF81
		where SYSTEM_ID = '{@SYSTEM_ID}'
		and   TBLSYU    = '{@TBLSYU}'
		and   FGJ       = '1'
		<og:where startKey="and">
			<og:and value="OBJ_NAME like '{@NAME}%'" />
			<og:and value="CDKH     =    '{@CDKH}'"  />
		</og:where>
		order by OBJ_NAME,SEQNO
	</og:query>
  </td>
  <td width="70px" class="S9">
	<og:value command="GET" key="DB.COUNT" />
  </td>
	<og:equals val1="{@DB.COUNT}" val2="0" notEquals="true" >
		<og:tableFilter classId="DBARG_OUT" keys="dir" vals="{@BASE_DIR}/sql/07_ARG" />
		<td><og:text>/sql/07_ARG</og:text></td>
	</og:equals>
 </tr>
</og:equals>
</table>

<br />
<og:text>BASE_DIR = {@BASE_DIR} Saved</og:text>

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