/**Begin D:\PDM_UPGRADE\PDM1\HAOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCASE' AND KSQL_COL_NAME ='FPERSONID')
 ALTER TABLE T_HAOS_STAFFCASE ADD (FPERSONID BIGINT );

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


/**Begin D:\PDM_UPGRADE\PDM1\HAOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCASE' AND KSQL_COL_NAME ='FNUMBER')
 ALTER TABLE T_HAOS_STAFFCASE ADD (FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCASE' AND KSQL_COL_NAME ='FNAME')
 ALTER TABLE T_HAOS_STAFFCASE ADD (FNAME NVARCHAR(100) DEFAULT ' ' );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCASE' AND KSQL_COL_NAME ='FADMINORGID')
 ALTER TABLE T_HAOS_STAFFCASE ADD (FADMINORGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCASE_L' AND KSQL_COL_NAME ='FNAME')
 ALTER TABLE T_HAOS_STAFFCASE_L ADD (FNAME NVARCHAR(100) DEFAULT ' ' );

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

