/**Begin D:\dev\tools\PDM_UPGRADE\pdm1\HAOS_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ADMINORG_BO') CREATE INDEX IDX_HAOS_ADMINORG_BO ON T_HAOS_ADMINORG ( FBOID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ADMINORG_PARENT') CREATE INDEX IDX_HAOS_ADMINORG_PARENT ON T_HAOS_ADMINORG ( FPARENTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ADMINORG_BSD') CREATE INDEX IDX_HAOS_ADMINORG_BSD ON T_HAOS_ADMINORG ( FBSED ,FBSLED );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ADMINORG_SN') CREATE INDEX IDX_HAOS_ADMINORG_SN ON T_HAOS_ADMINORG ( FSTRUCTNUMBER );


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ADMINSTRUCT_BSD') CREATE INDEX IDX_HAOS_ADMINSTRUCT_BSD ON T_HAOS_ADMINSTRUCT ( FBSED ,FBSLED );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ADMINSTRUCT_BO') CREATE INDEX IDX_HAOS_ADMINSTRUCT_BO ON T_HAOS_ADMINSTRUCT ( FBOID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ORGSORTCODE_BSD') CREATE INDEX IDX_HAOS_ORGSORTCODE_BSD ON T_HAOS_ORGSORTCODE ( FBSED ,FBSLED );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ORGTEAM_BO') CREATE INDEX IDX_HAOS_ORGTEAM_BO ON T_HAOS_ORGTEAM ( FBOID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ORGTEAM_SN') CREATE INDEX IDX_HAOS_ORGTEAM_SN ON T_HAOS_ORGTEAM ( FSTRUCTNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_ORGTEAM_BSD') CREATE INDEX IDX_HAOS_ORGTEAM_BSD ON T_HAOS_ORGTEAM ( FBSED ,FBSLED );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_OTSTRUCTORGTEAM_BO') CREATE INDEX IDX_HAOS_OTSTRUCTORGTEAM_BO ON T_HAOS_ORGTEAMSTRUCT ( FBOID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_OTSTRUCTORGTEAM_BSD') CREATE INDEX IDX_HAOS_OTSTRUCTORGTEAM_BSD ON T_HAOS_ORGTEAMSTRUCT ( FBSED ,FBSLED );


/**End D:\dev\tools\PDM_UPGRADE\pdm1\HAOS_constraint.sql **/
