/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PDM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PDM_ROUTEPROCESS' AND KSQL_COL_NAME ='FREFERENCE') 
 ALTER TABLE T_PDM_ROUTEPROCESS ADD (FREFERENCE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PDM_ROUTEPROCESS' AND KSQL_COL_NAME ='FRELATION') 
 ALTER TABLE T_PDM_ROUTEPROCESS ADD (FRELATION NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PDM_ROUTEPROCESS' AND KSQL_COL_NAME ='FOUTPUT') 
 ALTER TABLE T_PDM_ROUTEPROCESS ADD (FOUTPUT NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PDM_ROUTEPROCESS' AND KSQL_COL_NAME ='FINPUT') 
 ALTER TABLE T_PDM_ROUTEPROCESS ADD (FINPUT NVARCHAR(50) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PDM_ROUTEOPERATION' AND KSQL_COL_NAME ='FOPERATIONDESC') 
 ALTER TABLE T_PDM_ROUTEOPERATION ADD (FOPERATIONDESC NVARCHAR(50) DEFAULT ' ' NOT NULL );

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