<?xml version='1.0' encoding='UTF-8'?>
<ROWSET tableName='GF13'>
/****************************************************************************/
/* GF13 ( ｶﾚﾝﾀﾞｰﾌｧｲﾙ )                                                      */
/*                                                                          */
/* Created : 2022/11/10 17:41:42                                            */
/****************************************************************************/
<EXEC_SQL exists="0">
SELECT COUNT(*) FROM RDB$RELATIONS WHERE RDB$SYSTEM_FLAG=0 and RDB$RELATION_TYPE=0 and RDB$RELATION_NAME=UPPER('GF13');
CREATE TABLE GF13 (
   CDJGS    VARCHAR ( 10 )                  NOT NULL                
 , YYYYMM   VARCHAR (  6 )                  NOT NULL                
 , DY1      VARCHAR (  1 )                                          
 , DY2      VARCHAR (  1 )                                          
 , DY3      VARCHAR (  1 )                                          
 , DY4      VARCHAR (  1 )                                          
 , DY5      VARCHAR (  1 )                                          
 , DY6      VARCHAR (  1 )                                          
 , DY7      VARCHAR (  1 )                                          
 , DY8      VARCHAR (  1 )                                          
 , DY9      VARCHAR (  1 )                                          
 , DY10     VARCHAR (  1 )                                          
 , DY11     VARCHAR (  1 )                                          
 , DY12     VARCHAR (  1 )                                          
 , DY13     VARCHAR (  1 )                                          
 , DY14     VARCHAR (  1 )                                          
 , DY15     VARCHAR (  1 )                                          
 , DY16     VARCHAR (  1 )                                          
 , DY17     VARCHAR (  1 )                                          
 , DY18     VARCHAR (  1 )                                          
 , DY19     VARCHAR (  1 )                                          
 , DY20     VARCHAR (  1 )                                          
 , DY21     VARCHAR (  1 )                                          
 , DY22     VARCHAR (  1 )                                          
 , DY23     VARCHAR (  1 )                                          
 , DY24     VARCHAR (  1 )                                          
 , DY25     VARCHAR (  1 )                                          
 , DY26     VARCHAR (  1 )                                          
 , DY27     VARCHAR (  1 )                                          
 , DY28     VARCHAR (  1 )                                          
 , DY29     VARCHAR (  1 )                                          
 , DY30     VARCHAR (  1 )                                          
 , DY31     VARCHAR (  1 )                                          
 , UNIQ     BIGINT                          NOT NULL                
 , FGJ      VARCHAR (  1 )      DEFAULT '1' NOT NULL                
 , DYSET    VARCHAR ( 14 )                                          
 , PGSET    VARCHAR ( 50 )                                          
 , PGPSET   VARCHAR ( 50 )                                          
 , USRSET   VARCHAR ( 30 )                                          
 , DYUPD    VARCHAR ( 14 )                                          
 , PGUPD    VARCHAR ( 50 )                                          
 , PGPUPD   VARCHAR ( 50 )                                          
 , USRUPD   VARCHAR ( 30 )                                          
);
</EXEC_SQL>

<EXEC_SQL exists="0">
SELECT COUNT(*) FROM RDB$GENERATORS WHERE RDB$GENERATOR_NAME=UPPER('GF13S00');
CREATE SEQUENCE GF13S00 ;
</EXEC_SQL>

<EXEC_SQL>
CREATE TRIGGER GF13T00 FOR GF13
  BEFORE INSERT AS 
  BEGIN 
    NEW.UNIQ = GEN_ID( GF13S00,1 );
  END; 
</EXEC_SQL>
</ROWSET>
