/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCTB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_DATASOURCE_CONFIGS' AND KSQL_COL_NAME ='FORGTAKERELATION') 
 ALTER TABLE T_TCTB_DATASOURCE_CONFIGS ADD (FORGTAKERELATION CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCTB_ORG_TAKEDATA') 
 CREATE TABLE T_TCTB_ORG_TAKEDATA (
FID BIGINT DEFAULT 0 NOT NULL,
FTAXORG BIGINT DEFAULT 0 NOT NULL,
FACCOUNTORG BIGINT DEFAULT 0 NOT NULL,
FSTARTDATE DATETIME,
FENDDATE DATETIME
);



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