/**Begin D:\PDM_UPGRADE\PDM1\PUR_constraint.sql **/
EXEC p_DropIdx 'IDX_PUR_SALOUTSTOCK_FBILLDATE', 'T_PUR_SALOUTSTOCK';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_SALOUTSTOCK_FBILLDATE') CREATE INDEX IDX_PUR_SALOUTSTOCK_FBILLDATE ON T_PUR_SALOUTSTOCK ( FBILLDATE ,FBIZPARTNERID );

EXEC p_DropIdx 'IDX_PUR_ORDER_FBIZPARTNERID', 'T_PUR_ORDER';
EXEC p_DropIdx 'IDX_PUR_ORDER_FBILLDATE', 'T_PUR_ORDER';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_ORDER_FBIZPARTNERID') CREATE INDEX IDX_PUR_ORDER_FBIZPARTNERID ON T_PUR_ORDER ( FBILLDATE ,FBIZPARTNERID );

EXEC p_DropIdx 'IDX_PUR_INSTOCK_FBIZPARTNERID', 'T_PUR_INSTOCK';
EXEC p_DropIdx 'IDX_PUR_INSTOCK_FBILLDATE', 'T_PUR_INSTOCK';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_INSTOCK_FBIZPARTNERID') CREATE INDEX IDX_PUR_INSTOCK_FBIZPARTNERID ON T_PUR_INSTOCK ( FBILLDATE ,FBIZPARTNERID );

EXEC p_DropIdx 'IDX_PUR_RETURN_FBIZPARTNERID', 'T_PUR_RETURN';
EXEC p_DropIdx 'IDX_PUR_RETURN_FBillDate', 'T_PUR_RETURN';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_RETURN_FBIZPARTNERID') CREATE INDEX IDX_PUR_RETURN_FBIZPARTNERID ON T_PUR_RETURN ( FBILLDATE ,FBIZPARTNERID );

EXEC p_DropIdx 'IDX_PUR_RECEIPT_FBIZPARTNERID', 'T_PUR_RECEIPT';
EXEC p_DropIdx 'IDX_PUR_RECEIPT_FBILLDATE', 'T_PUR_RECEIPT';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_RECEIPT_FBIZPARTNERID') CREATE INDEX IDX_PUR_RECEIPT_FBIZPARTNERID ON T_PUR_RECEIPT ( FBILLDATE ,FBIZPARTNERID );

EXEC p_DropIdx 'IDX_PUR_DS_FBIZPARTNERID', 'T_PUR_DELIVERYSCHEDULE';
EXEC p_DropIdx 'IDX_PUR_DS_FBILLDATE', 'T_PUR_DELIVERYSCHEDULE';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_DS_FBIZPARTNERID') CREATE INDEX IDX_PUR_DS_FBIZPARTNERID ON T_PUR_DELIVERYSCHEDULE ( FBILLDATE ,FBIZPARTNERID );


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