/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BASE_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CUSTOMERGROUPDETAIL_STD') CREATE INDEX IDX_CUSTOMERGROUPDETAIL_STD ON T_BD_CUSTOMERGROUPDETAIL ( FSTANDARDID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SUPPLIERGROUPDETAIL_STD') CREATE INDEX IDX_SUPPLIERGROUPDETAIL_STD ON T_BD_SUPPLIERGROUPDETAIL ( FSTANDARDID );

EXEC p_DropIdx 'IDX_MATERIALGROUPDETAIL_MAT', 'T_BD_MATERIALGROUPDETAIL';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MATERIALGROUPDETAIL_DATA') CREATE INDEX IDX_MATERIALGROUPDETAIL_DATA ON T_BD_MATERIALGROUPDETAIL ( FMATERIALID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MATERIALGROUPDETAIL_STD') CREATE INDEX IDX_MATERIALGROUPDETAIL_STD ON T_BD_MATERIALGROUPDETAIL ( FSTANDARDID );


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