/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SM_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SM_RETURNAPPLY' AND KSQL_INDNAME = 'IDX_SM_RETURNAPPLY_FORGID') CREATE INDEX IDX_SM_RETURNAPPLY_FORGID ON T_SM_RETURNAPPLY ( FORGID ,FBIZDATE ,FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SM_RETURNAPPLY' AND KSQL_INDNAME = 'IDX_SM_RETURNAPPLY_FBIZDATE') CREATE INDEX IDX_SM_RETURNAPPLY_FBIZDATE ON T_SM_RETURNAPPLY ( FBIZDATE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SM_RETURNAPPLYENTRY' AND KSQL_INDNAME = 'IDX_SM_RETURNAPPLYE_MATID') CREATE INDEX IDX_SM_RETURNAPPLYE_MATID ON T_SM_RETURNAPPLYENTRY ( FMATERIALID ,FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SM_RETURNAPPLYENTRY' AND KSQL_INDNAME = 'IDX_SM_RAE_MATMASTERID') CREATE INDEX IDX_SM_RAE_MATMASTERID ON T_SM_RETURNAPPLYENTRY ( FMATERIALMASTERID ,FID );


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SM_constraint.sql **/
