/**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_TAX_MAIN' AND KSQL_COL_NAME ='FCONTACTINFORMATION') 
 ALTER TABLE T_TCTB_TAX_MAIN ADD (FCONTACTINFORMATION VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCTB_TAX_CREDITRATING') 
 CREATE TABLE T_TCTB_TAX_CREDITRATING (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FYEAR DATETIME,
FCREDITLEVEL VARCHAR(30) DEFAULT ' ' NOT NULL,
FRATINGSCORE VARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCTB_PER_INFORMATION') 
 CREATE TABLE T_TCTB_PER_INFORMATION (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPOSITION VARCHAR(30) DEFAULT ' ' NOT NULL,
FFULLNAME VARCHAR(30) DEFAULT ' ' NOT NULL,
FFIXEDTELEPHONE VARCHAR(100) DEFAULT ' ' NOT NULL,
FMOBILEPHONE VARCHAR(100) DEFAULT ' ' NOT NULL,
FMAIL VARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK VARCHAR(100) DEFAULT ' ' NOT NULL
);



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