/**Begin D:\DBA\PDM_UPGRADE\PDM1\BCM_constraint.sql **/

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_DCOLLECT_GROUP') CREATE INDEX IDX_BCM_DCOLLECT_GROUP ON T_BCM_DATACOLLECT ( FGROUPID ,FCOLLECTSTATUS );

 EXEC P_ALTERPK 'PK_T_BCM_BATCHEXPORTRPT_L', 'T_BCM_BATCHEXPORTRPT_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_BATEXPORTRPT') CREATE INDEX IDX_BCM_BATEXPORTRPT ON T_BCM_BATCHEXPORTRPT_L ( FID ,FLOCALEID );

/**End D:\DBA\PDM_UPGRADE\PDM1\BCM_constraint.sql **/
