<og:query command="{@command}" debug="{@debug}" dbid="{@DBID1}" maxRowCount="{@maxRowCount}">
	select	TABLE_NAME,CLM,NAME_JA,CLS_NAME,
			NVL(EDITOR,(CASE
						WHEN ( CLM LIKE 'CD%' OR CLM LIKE 'FG%' OR CLM LIKE 'KB%' )
							AND REPLACE(USE_LENGTH,',','.') <= 2 THEN 'MENU'
						ELSE 'TEXT'
						END)
			) AS EDITOR,
			NVL(RENDERER,(CASE
						WHEN ( CLM LIKE 'CD%' OR CLM LIKE 'FG%' OR CLM LIKE 'KB%' )
							AND REPLACE(USE_LENGTH,',','.') <= 2 THEN 'MENU'
						ELSE 'LABEL'
						END)
			) AS RENDERER,
			NVL(DBTYPE,(CASE 
						WHEN CLS_NAME = 'NUMBER'      THEN 'S9'
						WHEN CLS_NAME LIKE 'VARCHAR%' THEN
							CASE WHEN REPLACE(USE_LENGTH,',','.') <= 30  THEN 'X'
							     WHEN REPLACE(USE_LENGTH,',','.') >  30  THEN 'XK'
							END
						END)
			) AS DBTYPE,
			USE_LENGTH,DATA_DEFAULT,UNIQ,SYSTEM_ID
	from GF05 A
	where A.SYSTEM_ID = '{@SYSTEM_ID1}'
	and   A.TBLSYU    = '{@TBLSYU1}'
	and   A.FGJ       = '1'
	order by TABLE_NAME, CLM
</og:query>

<og:query command="{@command}" debug="{@debug}" dbid="{@DBID2}" maxRowCount="{@maxRowCount}" scope="request">
	select '' TABLE_NAME,CLM,NAME_JA,CLS_NAME,EDITOR,RENDERER,DBTYPE,USE_LENGTH,DATA_DEFAULT,UNIQ,SYSTEM_ID
	from GEA03 A
	where A.SYSTEM_ID = '{@SYSTEM_ID2}'
	and   A.FGJ       = '1'
	ORDER BY A.CLM
</og:query>

<og:tableMerge
	action        = "MINUS"
	masterScope   = "session"
	masterKeys    = "CLM"
	slaveScope    = "request"
	display       = "true"
/>

<og:value key="lblKey" value="A" />

<og:hidden name="SQL">
	INSERT INTO GEA03
		(SYSTEM_ID,CLM,NAME_JA,CLS_NAME,RENDERER,EDITOR,
		 DBTYPE,USE_LENGTH,DATA_DEFAULT,KBSAKU,
		 FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD)
	VALUES
		('{@SYSTEM_ID2}',[CLM],[NAME_JA],[CLS_NAME],[RENDERER],[EDITOR],
		 [DBTYPE],[USE_LENGTH],[DATA_DEFAULT],'1',
		 '1','{@USER.YMDH}','{@USER.YMDH}','{@USER.ID}','{@USER.ID}','{@GUI.KEY}')
</og:hidden>

<og:hidden name="SQL2">
	INSERT INTO GEA08
		(SYSTEM_ID,CLM,NAME_JA,LNAME,KBSAKU,KBLBL,LANG,
		 FGJ,DYSET,DYUPD,USRSET,USRUPD,PGUPD)
	VALUES
		('{@SYSTEM_ID2}',[CLM],[NAME_JA],[NAME_JA],'1','1','ja',
		 '1','{@USER.YMDH}','{@USER.YMDH}','{@USER.ID}','{@USER.ID}','{@GUI.KEY}')
</og:hidden>
