<jsp:directive.page pageEncoding="UTF-8" />
<og:equals val1="FUNCTION,PACKAGE,PACKAGE BODY,PROCEDURE,TYPE,TYPE BODY,TRIGGER" val2="{@OBJECT_TYPE}" contains="true">
	<og:value key="SQL1" >
		select '{@LBL.HIKAKU_MOTO}',OWNER,TYPE,NAME,LINE,TEXT
		from DBA_SOURCE
		where   OWNER = '{@OWNER1}'
		and     TYPE  = '{@OBJECT_TYPE}'
		and     NAME  like '{@OBJECT_NAME1}%'
		order by OWNER,TYPE,NAME,LINE
	</og:value>

	<og:value key="SQL2" >
		select '{@LBL.HIKAKU_SAKI}',OWNER,TYPE,NAME,LINE,TEXT
		from DBA_SOURCE
		where   OWNER = '{@OWNER2}'
		and     TYPE  = '{@OBJECT_TYPE}'
		and     NAME  like '{@OBJECT_NAME2}%'
		order by OWNER,TYPE,NAME,LINE
	</og:value>

	<og:value key="masterKeys" value="NAME,LINE,TEXT" />
	<og:value key="diffKeys"   value="LINE,TEXT" />
</og:equals>

<og:equals val1="TABLE,VIEW" val2="{@OBJECT_TYPE}" contains="true">
	<og:value key="SQL1">
		select '{@LBL.HIKAKU_MOTO}',OWNER,TABLE_NAME,COLUMN_ID NO,COLUMN_NAME,COLUMN_NAME AS DBLABEL,DATA_TYPE,
			    (CASE WHEN DATA_PRECISION IS NULL THEN DATA_LENGTH ELSE (DATA_PRECISION+0.1*DATA_SCALE) END) AS DATA_LENGTH,
--				COALESCE(DATA_PRECISION,DATA_LENGTH) DATA_LENGTH,
				DECODE(NULLABLE,'N','NN','') AS NN,DATA_DEFAULT
		from DBA_TAB_COLS
		where   OWNER = '{@OWNER1}'
		and     DATA_TYPE  = '{@OBJECT_TYPE}'
		and     TABLE_NAME  like '{@OBJECT_NAME1}%'
		and     INSTR(TABLE_NAME,'$') < 1
		order by OWNER,TABLE_NAME,COLUMN_ID
	</og:value>

	<og:value key="SQL2">
		select '{@LBL.HIKAKU_SAKI}',OWNER,TABLE_NAME,COLUMN_ID NO,COLUMN_NAME,COLUMN_NAME AS DBLABEL,DATA_TYPE,
			    (CASE WHEN DATA_PRECISION IS NULL THEN DATA_LENGTH ELSE (DATA_PRECISION+0.1*DATA_SCALE) END) AS DATA_LENGTH,
--				COALESCE(DATA_PRECISION,DATA_LENGTH) DATA_LENGTH,
				DECODE(NULLABLE,'N','NN','') AS NN,DATA_DEFAULT
		from DBA_TAB_COLS
		where   OWNER = '{@OWNER2}'
		and     DATA_TYPE  = '{@OBJECT_TYPE}'
		and     TABLE_NAME  like '{@OBJECT_NAME2}%'
		and     INSTR(TABLE_NAME,'$') < 1
		order by OWNER,TABLE_NAME,COLUMN_ID
	</og:value>

	<og:value key="masterKeys" value="TABLE_NAME,COLUMN_NAME" />
	<og:value key="diffKeys"   value="NO,DATA_TYPE,DATA_LENGTH,DATA_DEFAULT" />
</og:equals>

<og:equals val1="INDEX" val2="{@OBJECT_TYPE}" >
	<og:value key="SQL1">
		select '{@LBL.HIKAKU_MOTO}',TABLE_NAME,INDEX_NAME,COLUMN_POSITION NO,
				COLUMN_NAME,COLUMN_NAME AS DBLABEL,DESCEND
		from DBA_IND_COLUMNS
		where   TABLE_OWNER = '{@OWNER1}'
		and     TABLE_NAME  like '{@OBJECT_NAME1}%'
		and     INSTR(TABLE_NAME,'$') < 1
		order by TABLE_NAME,INDEX_NAME,COLUMN_POSITION
	</og:value>

	<og:value key="SQL2">
		select '{@LBL.HIKAKU_SAKI}',TABLE_NAME,INDEX_NAME,COLUMN_POSITION NO,
				COLUMN_NAME,COLUMN_NAME AS DBLABEL,DESCEND
		from DBA_IND_COLUMNS
		where   TABLE_OWNER = '{@OWNER2}'
		and     TABLE_NAME  like '{@OBJECT_NAME2}%'
		and     INSTR(TABLE_NAME,'$') < 1
		order by TABLE_NAME,INDEX_NAME,COLUMN_POSITION
	</og:value>

	<og:value key="masterKeys" value="TABLE_NAME,INDEX_NAME,COLUMN_NAME" />
	<og:value key="diffKeys"   value="NO" />
</og:equals>

<og:equals val1="SEQUENCE" val2="{@OBJECT_TYPE}" >
	<og:value key="SQL1">
		select '{@LBL.HIKAKU_MOTO}',SEQUENCE_NAME,MIN_VALUE,MAX_VALUE,INCREMENT_BY,
				CYCLE_FLAG,ORDER_FLAG,CACHE_SIZE,LAST_NUMBER
		from DBA_SEQUENCES
		where   SEQUENCE_OWNER = '{@OWNER1}'
		and     SEQUENCE_NAME  like '{@OBJECT_NAME2}%'
		order by SEQUENCE_NAME
	</og:value>

	<og:value key="SQL2">
		select '{@LBL.HIKAKU_SAKI}',SEQUENCE_NAME,MIN_VALUE,MAX_VALUE,INCREMENT_BY,
				CYCLE_FLAG,ORDER_FLAG,CACHE_SIZE,LAST_NUMBER
		from DBA_SEQUENCES
		where   SEQUENCE_OWNER = '{@OWNER2}'
		and     SEQUENCE_NAME  like '{@OBJECT_NAME2}%'
		order by SEQUENCE_NAME
	</og:value>

	<og:value key="masterKeys" value="SEQUENCE_NAME" />
	<og:value key="diffKeys"   value="MIN_VALUE,MAX_VALUE,INCREMENT_BY,CYCLE_FLAG,ORDER_FLAG" />
</og:equals>
