/**Begin D:\PDM_UPGRADE\PDM1\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_INSPECT_REPAIR')
CREATE TABLE T_FPM_INSPECT_REPAIR (
                                      FID BIGINT DEFAULT 0 NOT NULL,
                                      FENTRYID BIGINT DEFAULT 0 NOT NULL,
                                      FSEQ INT DEFAULT 0 NOT NULL,
                                      FREPAIRDATE DATETIME,
                                      FEXECUTEMAN BIGINT DEFAULT 0 NOT NULL,
                                      FEXECUTERESULT NVARCHAR(512) DEFAULT ' ' NOT NULL,
                                      FFAILEDBILLS NVARCHAR(1024) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_REPAIR_DETAIL')
CREATE TABLE T_FPM_REPAIR_DETAIL (
                                     FID BIGINT DEFAULT 0 NOT NULL,
                                     FENTRYID BIGINT DEFAULT 0 NOT NULL,
                                     FSEQ BIGINT DEFAULT 0 NOT NULL,
                                     FREPAIRID BIGINT DEFAULT 0 NOT NULL,
                                     FBILLID BIGINT DEFAULT 0 NOT NULL,
                                     FENTITYTYPE NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                     FSUCCESSFLAG CHAR(1) DEFAULT ' ' NOT NULL,
                                     FEXECUTERECORDID BIGINT DEFAULT 0 NOT NULL,
                                     FMATCHRULEID BIGINT DEFAULT 0 NOT NULL
);



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