/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_BILL_FILE_MAPPING') 
 CREATE TABLE T_BAS_BILL_FILE_MAPPING (
FID BIGINT DEFAULT 0 NOT NULL,
FFILENAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPATH NVARCHAR(512) DEFAULT ' ' NOT NULL,
FFIELDKEY NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDTYPE CHAR(1) DEFAULT '0' NOT NULL,
FFILELOCATION CHAR(1) DEFAULT '2' NOT NULL,
FENTITYNUM NVARCHAR(255) DEFAULT ' ' NOT NULL,
FAPPID NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBILLPKID BIGINT DEFAULT 0 NOT NULL,
FBILLENTRYPKID BIGINT DEFAULT 0 NOT NULL,
FATTPKID BIGINT DEFAULT 0 NOT NULL,
FSYNCDATE DATETIME DEFAULT GETDATE() NOT NULL,
FSYNCSTATUS CHAR(1) DEFAULT '3' NOT NULL,
FCREATOR BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME DEFAULT GETDATE() NOT NULL
);

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
