<og:query command="NEW" debug="{@debug}" notfoundMsg="">
		DELETE FROM GF07
		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 TABLE_NAME,INDEX_NAME,COLUMN_NAME AS CLM,COLUMN_POSITION AS SEQNO,
			'{@SYSTEM_ID}' AS SYSTEM_ID,'{@TBLSYU}' AS TBLSYU
		from USER_IND_COLUMNS
		where exists ( select 'X' from USER_TABLES
						where USER_TABLES.TABLE_NAME = USER_IND_COLUMNS.TABLE_NAME
						and   USER_TABLES.TABLESPACE_NAME IS NOT NULL
					)
		and   INSTR(TABLE_NAME,'$') < 1
		and   INSTR(INDEX_NAME,'$') < 1
		and   INSTR(COLUMN_NAME,'$') < 1
		<og:where startKey="and">
			<og:and value = "TABLE_NAME like '{@TABLE_NAME}%'" />
		</og:where>
		order by TABLE_NAME,INDEX_NAME,COLUMN_POSITION
</og:query>

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

<og:query command="NEW" debug="{@debug}" maxRowCount="100000">
		UPDATE GF06
		SET BIKO = INDEX_BIKO( SYSTEM_ID,TBLSYU,TABLE_NAME,INDEX_NAME )
		WHERE SYSTEM_ID = '{@SYSTEM_ID}'
		AND   TBLSYU    = '{@TBLSYU}'
	<og:where startKey="and">
		<og:and value = "TABLE_NAME like '{@TABLE_NAME}%'" />
	</og:where>
</og:query>
