<jsp:directive.page pageEncoding="UTF-8" />
<!-- PostgreSQL 版 -->
<og:equals val1="{@DBF.NAME @DBID}" val2="POSTGRES">
  <og:query command="NEW" dbid="{@DBID}" debug="{@debug}" maxRowCount="0">
  </og:query>
</og:equals>

<!-- ORACLE 版 -->
<og:equals val1="{@DBF.NAME @DBID}" val2="ORACLE">
  <og:query command="NEW" dbid="{@DBID}" debug="{@debug}" maxRowCount="0">
	select SEQUENCE_NAME	as SEQNAME ,
			MIN_VALUE		as MINVAL ,
			MAX_VALUE		as MAXVAL ,
			INCREMENT_BY	as INCREBY ,
			CYCLE_FLAG		as FGCYCLE ,
			CACHE_SIZE		as SUCACHE ,
			''				as TABLE_NAME,
			''				as CLM ,
			'{@MEM.SYSTEM_ID}' AS SYSTEM_ID,
			'{@TBLSYU}' AS TBLSYU
	from USER_SEQUENCES
	<og:where>
		<og:and value="'SEQUENCE'	 =		'{@OBJ_TYPE2}'" />
		<og:and value="SEQUENCE_NAME like	'{@SEQNAME}%'"	/>
	</og:where>
		order by SEQUENCE_NAME
  </og:query>
</og:equals>

<!-- FIREBIRD 版 -->
<og:equals val1="{@DBF.NAME @DBID}" val2="FIREBIRD">
  <og:query command="NEW" dbid="{@DBID}" debug="{@debug}" maxRowCount="0">
	select RDB$GENERATOR_NAME	as SEQNAME ,
			1		as INCREBY ,
			1		as STARTVAL ,
			1		as MINVAL ,
			0		as MAXVAL ,
			'0'		as FGCYCLE ,
			0		as SUCACHE ,
			''				as TABLE_NAME,
			''				as CLM ,
			'{@MEM.SYSTEM_ID}' AS SYSTEM_ID,
			'{@TBLSYU}' AS TBLSYU
	from RDB$GENERATORS
	where   RDB$SYSTEM_FLAG = 0
	<og:where startKey="and">
		<og:and value="'SEQUENCE'	 		=	'{@OBJ_TYPE2}'" />
		<og:and value="RDB$GENERATOR_NAME like	'{@SEQNAME}%'"	/>
	</og:where>
		order by RDB$GENERATOR_NAME
  </og:query>
</og:equals>
