IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_COSTBOM_KC') CREATE INDEX IDX_BD_COSTBOM_KC ON T_BD_COSTBOM ( FKEYCOL );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_BOMENTRY_KC') CREATE INDEX IDX_BD_BOMENTRY_KC ON T_BD_BOMENTRY ( FENTRYKEYCOL );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_VICEBOMENTRY_KC') CREATE INDEX IDX_BD_VICEBOMENTRY_KC ON T_BD_VICEBOMENTRY ( FCOPENTRYKEYCOL );