/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TPO_table.sql **/
 EXEC p_AlterColumn 'T_TPO_QYSDS_TYPES_L', 'FNAME', 'VARCHAR(200)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_TPO_QYSDS_TYPES_L', 'FFULLNAME', 'VARCHAR(200)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_TPO_QYSDS_TYPES', 'FFILTER', 'VARCHAR(550)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_TCVAT_ASSIST' AND KSQL_COL_NAME ='FTAXTYPE') 
 ALTER TABLE T_TPO_TCVAT_ASSIST ADD (FTAXTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_TCVAT_ASSIST' AND KSQL_COL_NAME ='FCLASSTYPE') 
 ALTER TABLE T_TPO_TCVAT_ASSIST ADD (FCLASSTYPE VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_TCVAT_ASSIST_TREE' AND KSQL_COL_NAME ='FTAXTYPE') 
 ALTER TABLE T_TPO_TCVAT_ASSIST_TREE ADD (FTAXTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_TCVAT_ASSISTENTRY' AND KSQL_COL_NAME ='FPOLICY') 
 ALTER TABLE T_TPO_TCVAT_ASSISTENTRY ADD (FPOLICY VARCHAR(1000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_TCVAT_ASSISTENTRY' AND KSQL_COL_NAME ='FFILTERWHERE') 
 ALTER TABLE T_TPO_TCVAT_ASSISTENTRY ADD (FFILTERWHERE VARCHAR(2000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_TCVAT_ASSISTENTRY' AND KSQL_COL_NAME ='FWHEREJSON') 
 ALTER TABLE T_TPO_TCVAT_ASSISTENTRY ADD (FWHEREJSON VARCHAR(2000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_TCVAT_ASSISTENTRY' AND KSQL_COL_NAME ='FSETTING') 
 ALTER TABLE T_TPO_TCVAT_ASSISTENTRY ADD (FSETTING VARCHAR(100) DEFAULT ' ' NOT NULL );

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