IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_MULDIMENDETAIL' AND KSQL_COL_NAME ='FBASICDATA3')
 ALTER TABLE T_HAOS_MULDIMENDETAIL ADD (FBASICDATA3 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_MULDIMENDETAIL' AND KSQL_COL_NAME ='FBASICDATA4')
 ALTER TABLE T_HAOS_MULDIMENDETAIL ADD (FBASICDATA4 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_MULDIMENDETAIL' AND KSQL_COL_NAME ='FBASICDATA5')
 ALTER TABLE T_HAOS_MULDIMENDETAIL ADD (FBASICDATA5 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_MULDIMENDETAILHIS' AND KSQL_COL_NAME ='FBASICDATA3')
 ALTER TABLE T_HAOS_MULDIMENDETAILHIS ADD (FBASICDATA3 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_MULDIMENDETAILHIS' AND KSQL_COL_NAME ='FBASICDATA4')
 ALTER TABLE T_HAOS_MULDIMENDETAILHIS ADD (FBASICDATA4 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_MULDIMENDETAILHIS' AND KSQL_COL_NAME ='FBASICDATA5')
 ALTER TABLE T_HAOS_MULDIMENDETAILHIS ADD (FBASICDATA5 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FSTAFFDIMENSION')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FSTAFFDIMENSION VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FBASEDATAID')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FBASEDATAID VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FMAPPERSONINFO')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FMAPPERSONINFO VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FMAPFIELDFLAG')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FMAPFIELDFLAG VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FBYPOSORGRESTAFF')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FBYPOSORGRESTAFF CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FSTAFFSTARTFLAG')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FSTAFFSTARTFLAG VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMENSION' AND KSQL_COL_NAME ='FSTAFFENDFLAG')
 ALTER TABLE T_HAOS_STAFFDIMENSION ADD (FSTAFFENDFLAG VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMPERSON' AND KSQL_COL_NAME ='FBASICDATA3')
 ALTER TABLE T_HAOS_STAFFDIMPERSON ADD (FBASICDATA3 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMPERSON' AND KSQL_COL_NAME ='FBASICDATA4')
 ALTER TABLE T_HAOS_STAFFDIMPERSON ADD (FBASICDATA4 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HAOS_STAFFDIMPERSON' AND KSQL_COL_NAME ='FBASICDATA5')
 ALTER TABLE T_HAOS_STAFFDIMPERSON ADD (FBASICDATA5 BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HAOS_STAFFDIMENSONENTRY')
 CREATE TABLE T_HAOS_STAFFDIMENSONENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSTAFFBILL VARCHAR(60) DEFAULT ' ' NOT NULL,
FMAPFIELD VARCHAR(60) DEFAULT ' ' NOT NULL,
FIISEXISTSTAFFIELD VARCHAR(2) DEFAULT '1' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL
);