/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SM_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_SALESAGENCY_CUSTOMER') CREATE INDEX IDX_SM_SALESAGENCY_CUSTOMER ON T_SM_SALSAGENCY ( FCUSTOMERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_RETURNAPPLY_CUSTOMER') CREATE INDEX IDX_SM_RETURNAPPLY_CUSTOMER ON T_SM_RETURNAPPLY ( FCUSTOMERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_SALORDER_CUSTOMER') CREATE INDEX IDX_SM_SALORDER_CUSTOMER ON T_SM_SALORDER ( FCUSTOMERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_DELINOTICE_CUSTOMER') CREATE INDEX IDX_SM_DELINOTICE_CUSTOMER ON T_SM_DELIVERNOTICE ( FCUSTOMERID );


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