/**Begin D:\PDM_UPGRADE\PDM1\HBSS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPOINTTYPE' AND KSQL_COL_NAME ='FORINUMBER') 
 ALTER TABLE T_HBSS_APPOINTTYPE ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPOINTTYPE' AND KSQL_COL_NAME ='FORINAME') 
 ALTER TABLE T_HBSS_APPOINTTYPE ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPOINTTYPE' AND KSQL_COL_NAME ='FORISTATUS') 
 ALTER TABLE T_HBSS_APPOINTTYPE ADD (FORISTATUS VARCHAR(2) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPOINTTYPE_L' AND KSQL_COL_NAME ='FORINAME') 
 ALTER TABLE T_HBSS_APPOINTTYPE_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPOINTTYPEGROUP' AND KSQL_COL_NAME ='FORINUMBER') 
 ALTER TABLE T_HBSS_APPOINTTYPEGROUP ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPOINTTYPEGROUP' AND KSQL_COL_NAME ='FORINAME') 
 ALTER TABLE T_HBSS_APPOINTTYPEGROUP ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPOINTTYPEGROUP' AND KSQL_COL_NAME ='FORISTATUS') 
 ALTER TABLE T_HBSS_APPOINTTYPEGROUP ADD (FORISTATUS VARCHAR(2) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPOINTTYPEGROUP_L' AND KSQL_COL_NAME ='FORINAME') 
 ALTER TABLE T_HBSS_APPOINTTYPEGROUP_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPTREASONGROUP' AND KSQL_COL_NAME ='FORINUMBER') 
 ALTER TABLE T_HBSS_APPTREASONGROUP ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPTREASONGROUP' AND KSQL_COL_NAME ='FORINAME') 
 ALTER TABLE T_HBSS_APPTREASONGROUP ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPTREASONGROUP' AND KSQL_COL_NAME ='FORISTATUS') 
 ALTER TABLE T_HBSS_APPTREASONGROUP ADD (FORISTATUS VARCHAR(2) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_APPTREASONGROUP_L' AND KSQL_COL_NAME ='FORINAME') 
 ALTER TABLE T_HBSS_APPTREASONGROUP_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CADRECATEGORY' AND KSQL_COL_NAME ='FORINUMBER') 
 ALTER TABLE T_HBSS_CADRECATEGORY ADD (FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CADRECATEGORY' AND KSQL_COL_NAME ='FORINAME') 
 ALTER TABLE T_HBSS_CADRECATEGORY ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CADRECATEGORY' AND KSQL_COL_NAME ='FORISTATUS') 
 ALTER TABLE T_HBSS_CADRECATEGORY ADD (FORISTATUS VARCHAR(2) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CADRECATEGORY_L' AND KSQL_COL_NAME ='FORINAME') 
 ALTER TABLE T_HBSS_CADRECATEGORY_L ADD (FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL );

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