/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MDS_table.sql **/
 EXEC p_AlterColumn 'T_MDS_PDCC', 'FRUNNINGLOG', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_PDCC' AND KSQL_COL_NAME ='FRUNNINGLOG_TAG') 
 ALTER TABLE T_MDS_PDCC ADD (FRUNNINGLOG_TAG NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_RPLANCAL' AND KSQL_COL_NAME ='FTYPE') 
 ALTER TABLE T_MDS_RPLANCAL ADD (FTYPE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_RPLANCAL' AND KSQL_COL_NAME ='FRUNNINGLOG_TAG') 
 ALTER TABLE T_MDS_RPLANCAL ADD (FRUNNINGLOG_TAG NCLOB );

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