/**Begin C:\PDM_UPGRADE\PDM1\PUR_table.sql **/
 EXEC p_AlterColumn 'T_PUR_CERTIFIAPPLY', 'FPROJECTNAME', 'NVARCHAR(512)', 'NOT NULL', '0010', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CERTIFIAPPLY' AND KSQL_COL_NAME IN ('FNEXTAUDITOR')) 
 ALTER TABLE T_PUR_CERTIFIAPPLY ADD (FNEXTAUDITOR NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_APPROVE' AND KSQL_COL_NAME IN ('FNEXTAUDITOR')) 
 ALTER TABLE T_PUR_APPROVE ADD (FNEXTAUDITOR NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SCENE' AND KSQL_COL_NAME IN ('FNEXTAUDITOR')) 
 ALTER TABLE T_PUR_SCENE ADD (FNEXTAUDITOR NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_MATERIAL' AND KSQL_COL_NAME IN ('FNEXTAUDITOR')) 
 ALTER TABLE T_PUR_MATERIAL ADD (FNEXTAUDITOR NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SAMPLE' AND KSQL_COL_NAME IN ('FNEXTAUDITOR')) 
 ALTER TABLE T_PUR_SAMPLE ADD (FNEXTAUDITOR NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_APTITUDE' AND KSQL_COL_NAME IN ('FNEXTAUDITOR')) 
 ALTER TABLE T_PUR_APTITUDE ADD (FNEXTAUDITOR NVARCHAR(100) DEFAULT ' ' NOT NULL );

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