/**Begin D:\PDM_UPGRADE\PDM1\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_EXECBIASANALYS')
CREATE TABLE T_FPM_EXECBIASANALYS (
                                      FID BIGINT DEFAULT 0 NOT NULL,
                                      FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                      FBILLSTATUS NVARCHAR(30) DEFAULT ' ' NOT NULL,
                                      FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                      FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                      FAUDITORID BIGINT DEFAULT 0 NOT NULL,
                                      FAUDITDATE DATETIME,
                                      FMODIFYTIME DATETIME,
                                      FCREATETIME DATETIME,
                                      FBODYSYSID BIGINT DEFAULT 0 NOT NULL,
                                      FREPORTORGID BIGINT DEFAULT 0 NOT NULL,
                                      FREPORTTYPEID BIGINT DEFAULT 0 NOT NULL,
                                      FREPORTPERIODID BIGINT DEFAULT 0 NOT NULL,
                                      FDECLARESTARTDATE DATETIME,
                                      FDECLAREDEADLINE DATETIME,
                                      FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                      FPLANSTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                      FCHANGESTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                      FAMOUNTUNIT NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                      FEXRATETABLE BIGINT DEFAULT 0 NOT NULL,
                                      FEXCHANGERATEDATE DATETIME,
                                      FREMARK NVARCHAR(500) DEFAULT ' ' NOT NULL,
                                      FSOURCEBILLTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                      FSOURCEBILL BIGINT DEFAULT 0 NOT NULL,
                                      FSOURCE NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                      FRETURNCOMMENTS NVARCHAR(500) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_EXECBIASANALYS_L')
CREATE TABLE T_FPM_EXECBIASANALYS_L (
                                        FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
                                        FID BIGINT DEFAULT 0 NOT NULL,
                                        FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
                                        FNAME VARCHAR(255) DEFAULT ' ' NOT NULL
);



/**End D:\PDM_UPGRADE\PDM1\FPM_table.sql **/
