<?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}/db/{@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/install/01_TABLE,false" />
  		<td>/sql/install/01_TABLE</td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="TABLE{@TYPE}" keys="dir,XML" vals="{@BASE_DIR}/xml/install/01_TABLE,true" />
			<td>/xml/install/01_TABLE</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,DROP" vals="{@BASE_DIR}/sql/install/02_INDEX,false,true" />
		<td>/sql/install/02_INDEX</td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="INDEX{@TYPE}" keys="dir,XML,DROP" vals="{@BASE_DIR}/xml/install/02_INDEX,true,true" />
			<td>/xml/install/02_INDEX</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   SEQNAME   not like '%S00'			-- TABLE include
		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/install/03_SEQ,false" />
		<td>/sql/install/03_SEQ</td>

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

<og:equals val1="{@VIEW}" val2="true" >
 <tr>
  <td>GF82 VIEW</td>
  <td>
	<og:link gamenId="GF2081" column="OBJ_NAME" href="index.jsp" target="CONTENTS" lbl="VIEW"
		keys="command,SYSTEM_ID,TBLSYU,OBJ_TYPE,OBJ_NAME" vals="NEW,{@SYSTEM_ID},[TBLSYU],[OBJ_TYPE],[OBJ_NAME]" />
  </td>
  <td>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="0">
		select SYSTEM_ID,TBLSYU,OBJ_TYPE,OBJ_NAME,NAME_JA
		from GF82
		where SYSTEM_ID = '{@SYSTEM_ID}'
		and   TBLSYU    = '{@TBLSYU}'
		and   OBJ_TYPE  = 'VIEW'
		and   FGJ       = '1'
		<og:where startKey="and">
			<og:and value="OBJ_NAME like '{@NAME}%'" />
		</og:where>
		order by OBJ_NAME,OBJ_TYPE
	</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="DBSRC_OUT" keys="dir,XML" vals="{@BASE_DIR}/sql/install/04_VIEW,false" />
		<td>/sql/install/04_VIEW</td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="DBSRC_OUT" keys="dir,XML" vals="{@BASE_DIR}/xml/install/04_VIEW,true" />
			<td>/xml/install/04_VIEW</td>
		</og:equals>
	</og:equals>
 </tr>
</og:equals>

<og:equals val1="{@SRC}" val2="true" >
 <tr>
  <td>GF82 SRC</td>
  <td>
	<og:link gamenId="GF2081" column="OBJ_NAME" href="index.jsp" target="CONTENTS" lbl="SRC"
		keys="command,SYSTEM_ID,TBLSYU,OBJ_TYPE,OBJ_NAME" vals="NEW,{@SYSTEM_ID},[TBLSYU],[OBJ_TYPE],[OBJ_NAME]" />
  </td>
  <td>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="0">
		select SYSTEM_ID,TBLSYU,OBJ_TYPE,OBJ_NAME,NAME_JA
		from GF82
		where SYSTEM_ID = '{@SYSTEM_ID}'
		and   TBLSYU    = '{@TBLSYU}'
		and   OBJ_TYPE in ( 'PROCEDURE','PACKAGE','PACKAGE BODY','FUNCTION' )
		and   FGJ       = '1'
		<og:where startKey="and">
			<og:and value="OBJ_NAME like '{@NAME}%'" />
		</og:where>
		order by OBJ_NAME,OBJ_TYPE
	</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="DBSRC_OUT" keys="dir,XML" vals="{@BASE_DIR}/sql/install/05_SRC,false" />
		<td>/sql/install/05_SRC</td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="DBSRC_OUT" keys="dir,XML" vals="{@BASE_DIR}/xml/install/05_SRC,true" />
			<td>/xml/install/05_SRC</td>
		</og:equals>
	</og:equals>
 </tr>
</og:equals>


<og:equals val1="{@TRG}" val2="true" >
 <tr>
  <td>GF82 TRG</td>
  <td>
	<og:link gamenId="GF2081" column="OBJ_NAME" href="index.jsp" target="CONTENTS" lbl="TRIGGER"
		keys="command,SYSTEM_ID,TBLSYU,OBJ_TYPE,OBJ_NAME" vals="NEW,{@SYSTEM_ID},[TBLSYU],[OBJ_TYPE],[OBJ_NAME]" />
  </td>
  <td>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="0">
		select SYSTEM_ID,TBLSYU,OBJ_TYPE,OBJ_NAME,NAME_JA
		from GF82
		where SYSTEM_ID = '{@SYSTEM_ID}'
		and   TBLSYU    = '{@TBLSYU}'
		and   OBJ_TYPE  = 'TRIGGER'
		and   OBJ_NAME  not like '%T00'			-- TABLE include
		and   FGJ       = '1'
		<og:where startKey="and">
			<og:and value="OBJ_NAME like '{@NAME}%'" />
		</og:where>
		order by OBJ_NAME,OBJ_TYPE
	</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="DBSRC_OUT" keys="dir,XML" vals="{@BASE_DIR}/sql/install/06_TRG,false" />
		<td>/sql/install/06_TRG</td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="DBSRC_OUT" keys="dir,XML" vals="{@BASE_DIR}/xml/install/06_TRG,true" />
			<td>/xml/install/06_TRG</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,XML" vals="{@BASE_DIR}/sql/install/07_ARG,false" />
		<td>/sql/install/07_ARG</td>

		<og:equals val1="{@XML}" val2="true" >
			<og:tableFilter classId="DBARG_OUT" keys="dir,XML" vals="{@BASE_DIR}/xml/install/07_ARG,true" />
			<td>/xml/install/07_ARG</td>
		</og:equals>
	</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>
