/**Begin D:\PDM_UPGRADE\PDM1\HRDI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_INTSCENERULE' AND KSQL_COL_NAME ='FWRITETYPE') 
 ALTER TABLE T_HRDI_INTSCENERULE ADD (FWRITETYPE VARCHAR(2) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_INTSCENERULE' AND KSQL_COL_NAME ='FCLOUDID') 
 ALTER TABLE T_HRDI_INTSCENERULE ADD (FCLOUDID VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_INTSCENERULE' AND KSQL_COL_NAME ='FAPPID') 
 ALTER TABLE T_HRDI_INTSCENERULE ADD (FAPPID VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_INTSCENERULE' AND KSQL_COL_NAME ='FSERVICENAME') 
 ALTER TABLE T_HRDI_INTSCENERULE ADD (FSERVICENAME VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_INTSCENERULE' AND KSQL_COL_NAME ='FMETHOD') 
 ALTER TABLE T_HRDI_INTSCENERULE ADD (FMETHOD VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_INTSCENERULE' AND KSQL_COL_NAME ='FREMARK') 
 ALTER TABLE T_HRDI_INTSCENERULE ADD (FREMARK NVARCHAR(600) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_INTSCENERULE_L' AND KSQL_COL_NAME ='FREMARK') 
 ALTER TABLE T_HRDI_INTSCENERULE_L ADD (FREMARK NVARCHAR(600) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_INTRULEENTRY' AND KSQL_COL_NAME ='FOPERATE') 
 ALTER TABLE T_HRDI_INTRULEENTRY ADD (FOPERATE VARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_MIDTABLETPLENTRY' AND KSQL_COL_NAME ='FFIELDDESCRIPTION') 
 ALTER TABLE T_HRDI_MIDTABLETPLENTRY ADD (FFIELDDESCRIPTION NVARCHAR(2000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRDI_MIDTABLETPLENTRY_L' AND KSQL_COL_NAME ='FFIELDDESCRIPTION') 
 ALTER TABLE T_HRDI_MIDTABLETPLENTRY_L ADD (FFIELDDESCRIPTION NVARCHAR(2000) DEFAULT ' ' NOT NULL );

/**End D:\PDM_UPGRADE\PDM1\HRDI_table.sql **/
