<og:query command="NEW" debug="{@debug}" notfoundMsg="">
		DELETE FROM GF06
		WHERE SYSTEM_ID = '{@SYSTEM_ID}'
		AND   TBLSYU    = '{@TBLSYU}'
	<og:where startKey="and">
		<og:and value = "TABLE_NAME like '{@TABLE_NAME}%'" />
	</og:where>
</og:query>

<og:query command="NEW" dbid="{@DBID}" debug="{@debug}" maxRowCount="100000">
		select INDEX_NAME,TABLE_NAME,TABLESPACE_NAME,INDEX_NAME AS NAME_JA,
				(CASE UNIQUENESS WHEN 'UNIQUE' THEN '1' ELSE '2' END) AS INDTYPE,
				'0' AS INITIAL_AUTO,
				INITIAL_EXTENT/1024 AS INITIAL_EXTENT,
				NEXT_EXTENT/1024 AS NEXT_EXTENT,
				'{@TBLSYU}' AS TBLSYU,'{@SYSTEM_ID}' AS SYSTEM_ID
		from USER_INDEXES
		where exists ( select 'X' from USER_TABLES
						where USER_TABLES.TABLE_NAME = USER_INDEXES.TABLE_NAME
					)
		and   INSTR(TABLE_NAME,'$') < 1
		and   INSTR(INDEX_NAME,'$') < 1
		and   TABLESPACE_NAME IS NOT NULL
	<og:where startKey="and">
		<og:and value = "TABLE_NAME  like '{@TABLE_NAME}%'"  />
	</og:where>
		order by TABLE_NAME,INDEX_NAME
</og:query>

<og:tableUpdate
	command		= "ENTRY"
	queryType	= "JDBCTableUpdate"
	selectedAll = "true"
	displayMsg  = "MSG0040"
>
	INSERT INTO GF06
		(SYSTEM_ID,TBLSYU,TABLE_NAME,INDEX_NAME,NAME_JA,INDTYPE,TABLESPACE_NAME,
		 INITIAL_EXTENT,INITIAL_AUTO,
		 FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD)
	VALUES
		([SYSTEM_ID],[TBLSYU],[TABLE_NAME],[INDEX_NAME],[NAME_JA],[INDTYPE],[TABLESPACE_NAME],
		 [INITIAL_EXTENT],16,
		 '1','{@USER.YMDH}','{@USER.YMDH}','{@USER.ID}','{@USER.ID}','{@GUI.KEY}')
</og:tableUpdate>

