
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FORINUMBER')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FORINAME')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FORISTATUS')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FORISTATUS VARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION_L' AND KSQL_COL_NAME ='FORINAME')
 ALTER TABLE T_HAOS_STAFFDIMENSION_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCYCLE' AND KSQL_COL_NAME ='FORINUMBER')
 ALTER TABLE T_HAOS_STAFFCYCLE ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCYCLE' AND KSQL_COL_NAME ='FORINAME')
 ALTER TABLE T_HAOS_STAFFCYCLE ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCYCLE' AND KSQL_COL_NAME ='FORISTATUS')
 ALTER TABLE T_HAOS_STAFFCYCLE ADD (FORISTATUS VARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFCYCLE_L' AND KSQL_COL_NAME ='FORINAME')
 ALTER TABLE T_HAOS_STAFFCYCLE_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFACTIVITY' AND KSQL_COL_NAME ='FORINUMBER')
 ALTER TABLE T_HAOS_STAFFACTIVITY ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFACTIVITY' AND KSQL_COL_NAME ='FORINAME')
 ALTER TABLE T_HAOS_STAFFACTIVITY ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFACTIVITY' AND KSQL_COL_NAME ='FORISTATUS')
 ALTER TABLE T_HAOS_STAFFACTIVITY ADD (FORISTATUS VARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFACTIVITY_L' AND KSQL_COL_NAME ='FORINAME')
 ALTER TABLE T_HAOS_STAFFACTIVITY_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFACTIVITYTYPE' AND KSQL_COL_NAME ='FORINUMBER')
 ALTER TABLE T_HAOS_STAFFACTIVITYTYPE ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFACTIVITYTYPE' AND KSQL_COL_NAME ='FORINAME')
 ALTER TABLE T_HAOS_STAFFACTIVITYTYPE ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFACTIVITYTYPE' AND KSQL_COL_NAME ='FORISTATUS')
 ALTER TABLE T_HAOS_STAFFACTIVITYTYPE ADD (FORISTATUS VARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFACTIVITYTYPE_L' AND KSQL_COL_NAME ='FORINAME')
 ALTER TABLE T_HAOS_STAFFACTIVITYTYPE_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
 
 
