/**Begin C:\PDM_UPGRADE\PDM1\SRM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CALFORMULA' AND KSQL_COL_NAME IN ('FCONDITIONSUPPLIERFIELD')) 
 ALTER TABLE T_PUR_CALFORMULA ADD (FCONDITIONSUPPLIERFIELD VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CALFORMULA' AND KSQL_COL_NAME IN ('FCONDITIONORDERBYFIELD')) 
 ALTER TABLE T_PUR_CALFORMULA ADD (FCONDITIONORDERBYFIELD VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CALFORMULA' AND KSQL_COL_NAME IN ('FCONDITIONORDERBYTYPE')) 
 ALTER TABLE T_PUR_CALFORMULA ADD (FCONDITIONORDERBYTYPE VARCHAR(10) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CALFORMULAENTITY' AND KSQL_COL_NAME IN ('FINCLUDESUBORG')) 
 ALTER TABLE T_PUR_CALFORMULAENTITY ADD (FINCLUDESUBORG CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CALFORMULAENTITY' AND KSQL_COL_NAME IN ('FORDERBYFIELD')) 
 ALTER TABLE T_PUR_CALFORMULAENTITY ADD (FORDERBYFIELD VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CALFORMULAENTITY' AND KSQL_COL_NAME IN ('FORDERBYTYPE')) 
 ALTER TABLE T_PUR_CALFORMULAENTITY ADD (FORDERBYTYPE VARCHAR(10) DEFAULT ' ' NOT NULL );

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