<jsp:directive.page pageEncoding="UTF-8" />
<og:query command="{@command}" debug="{@debug}" maxRowCount="0" stopZero="true">
	select	RENDERER,EDITOR,DBTYPE,
			'' as DTYPE,CLM,NAME_JA,BIKO,
			CLS_NAME,USE_LENGTH,TABLE_NAME,SEQNO,
			FGCOM,SYSTEM_ID,FGJ,UNIQ
	from GF05
	where SYSTEM_ID  = '{@SYSTEM_ID}'
	and   TBLSYU     = '{@TBLSYU}'
	<og:where startKey="and">
		<og:and value="TABLE_NAME like '{@TABLE_NAME}%'" />
		<og:and value="CLM        like '{@CLM}%'" />
	</og:where>
	and   FGCOM		<= '5'
	and   FGJ		= '1'
	and (
		RENDERER is NULL or EDITOR is null or DBTYPE is null
		or	( CLS_NAME in ( 'NUMBER' ,'DECIMAL' , 'INTEGER' ) and DBTYPE not in ( 'S9' , 'R' ) )
		or  ( CLS_NAME like 'VARCHAR%' and DBTYPE in ( 'S9' , 'R' ) )
	)
	order by SYSTEM_ID,CLM,TABLE_NAME
</og:query>

<!-- UNIQ のみでユニークになるが、安全のため、SYSTEM_IDとTBLSYUだけは条件に加えておく -->
<og:hidden name="SQL" >
	UPDATE GF05 SET
			RENDERER		= [RENDERER],
			EDITOR			= [EDITOR],
			DBTYPE			= [DBTYPE],
			CLS_NAME		= [CLS_NAME],
			FGCOM			= [FGCOM],
			BIKO			= [BIKO],
			CDKH			= 'C',
			FGJ				= '1',
			DYUPD			= '{@USER.YMDH}',
			USRUPD			= '{@USER.ID}',
			PGUPD			= '{@GUI.KEY}'
	WHERE UNIQ		= [UNIQ]
	AND   SYSTEM_ID	= '{@SYSTEM_ID}'
	AND   TBLSYU	= '{@TBLSYU}'
</og:hidden>

<og:hidden name="noWritable">SYSTEM_ID,TABLE_NAME</og:hidden>
