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

 EXEC P_ALTERPK 'PK_T_BCM_ISCUSTOMREGISTER', 'T_BCM_ISCUSTOMREGISTER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ISCUSTOMREGISTER') CREATE INDEX IDX_BCM_ISCUSTOMREGISTER ON T_BCM_ISCUSTOMREGISTER ( FSERVICE );


 EXEC P_ALTERPK 'PK_T_BCM_DATACOLLECTRECORD', 'T_BCM_DATACOLLECTRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_DATACOLLECTRECORD') CREATE INDEX IDX_BCM_DATACOLLECTRECORD ON T_BCM_DATACOLLECTRECORD ( FGROUP ,FMODEL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_COLLECTRECORD_QUERY') CREATE INDEX IDX_BCM_COLLECTRECORD_QUERY ON T_BCM_DATACOLLECTRECORD ( FMODEL ,FCREATOR ,FSCENARIO ,FYEAR ,FPERIOD );



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