
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_ROUTER_MAT') CREATE INDEX IDX_BD_ROUTER_MAT ON T_BD_ROUTER ( FMATERIALID );

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_ROUTER_NUM') CREATE INDEX IDX_BD_ROUTER_NUM ON T_BD_ROUTER ( FNUMBER );