/**Begin C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
 EXEC p_AlterColumn 'T_SRC_DECISIONCHGENTRY', 'FMATERIALNANE', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONCHGENTRY' AND KSQL_COL_NAME IN ('FMATERIALNEWID')) 
 ALTER TABLE T_SRC_DECISIONCHGENTRY ADD (FMATERIALNEWID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONCHGENTRY' AND KSQL_COL_NAME IN ('FMATERIALNANENEW')) 
 ALTER TABLE T_SRC_DECISIONCHGENTRY ADD (FMATERIALNANENEW NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONCHGENTRY' AND KSQL_COL_NAME IN ('FUNITNEWID')) 
 ALTER TABLE T_SRC_DECISIONCHGENTRY ADD (FUNITNEWID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONCHGENTRY' AND KSQL_COL_NAME IN ('FBASEUNITID')) 
 ALTER TABLE T_SRC_DECISIONCHGENTRY ADD (FBASEUNITID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONCHGENTRY' AND KSQL_COL_NAME IN ('FBASEQTY')) 
 ALTER TABLE T_SRC_DECISIONCHGENTRY ADD (FBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONCHGENTRY' AND KSQL_COL_NAME IN ('FMATERIALMODELNEW')) 
 ALTER TABLE T_SRC_DECISIONCHGENTRY ADD (FMATERIALMODELNEW NVARCHAR(1024) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONCHGENTRY' AND KSQL_COL_NAME IN ('FDESCRIPTIONNEW')) 
 ALTER TABLE T_SRC_DECISIONCHGENTRY ADD (FDESCRIPTIONNEW NVARCHAR(1024) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_MATERIALCHGENTRY' AND KSQL_COL_NAME IN ('FBASEUNITID')) 
 ALTER TABLE T_SRC_MATERIALCHGENTRY ADD (FBASEUNITID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_MATERIALCHGENTRY' AND KSQL_COL_NAME IN ('FBASEQTY')) 
 ALTER TABLE T_SRC_MATERIALCHGENTRY ADD (FBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );

/**End C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
