/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCTB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCTB_TAXINFO_POINT') 
 CREATE TABLE T_TCTB_TAXINFO_POINT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_XFS_ENTRY' AND KSQL_COL_NAME ='FXFSTAXITEMRATE') 
 ALTER TABLE T_TCTB_XFS_ENTRY ADD (FXFSTAXITEMRATE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_DATASOURCE_CONFIGS' AND KSQL_COL_NAME ='FBIZNAME') 
 ALTER TABLE T_TCTB_DATASOURCE_CONFIGS ADD (FBIZNAME VARCHAR(200) DEFAULT ' ' NOT NULL );
 EXEC p_AlterColumn 'T_TCTB_DATASOURCE_ENTRY', 'FBIZSUBNAME', 'VARCHAR(500)', 'NOT NULL', '0100', ''' ''';


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