/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_FINCARD_DEPRETIME') 
 CREATE TABLE T_FA_FINCARD_DEPRETIME (
FFINCARDID BIGINT DEFAULT 0 NOT NULL,
FDEPRETIME VARCHAR(30) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FASSETBOOKID BIGINT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_DEPRESPLITENTRY' AND KSQL_COL_NAME ='FASSINFOIMPORT') 
 ALTER TABLE T_FA_DEPRESPLITENTRY ADD (FASSINFOIMPORT NVARCHAR(1000) );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILLENTRY' AND KSQL_COL_NAME ='FREALACCOUNTDATE') 
 ALTER TABLE T_FA_PURCHASEBILLENTRY ADD (FREALACCOUNTDATE DATETIME );

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