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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_SALARYVERBILL' AND KSQL_COL_NAME ='FTASKRULEVID') 
 ALTER TABLE T_HPDI_SALARYVERBILL ADD (FTASKRULEVID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_SINSURVERBILL' AND KSQL_COL_NAME ='FTASKRULEVID') 
 ALTER TABLE T_HPDI_SINSURVERBILL ADD (FTASKRULEVID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_SUMMARYVBILL' AND KSQL_COL_NAME ='FTASKRULEVID') 
 ALTER TABLE T_HPDI_SUMMARYVBILL ADD (FTASKRULEVID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TAXVERBILL' AND KSQL_COL_NAME ='FTASKRULEVID') 
 ALTER TABLE T_HPDI_TAXVERBILL ADD (FTASKRULEVID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_TASKCENTERENT' AND KSQL_COL_NAME ='FISMANUALVERIFY') 
 ALTER TABLE T_HPDI_TASKCENTERENT ADD (FISMANUALVERIFY CHAR(1) DEFAULT '0' NOT NULL );
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_table.sql **/
