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

 EXEC P_ALTERPK 'PK_T_BCM_DYNAMICSTOCKRATIO', 'T_BCM_DYNAMICSTOCKRATIO', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_DYNAMICSTOCKRATIO' AND KSQL_INDNAME = 'IDX_BCM_DYNSTOCKRATIO_SCENE') CREATE INDEX IDX_BCM_DYNSTOCKRATIO_SCENE ON T_BCM_DYNAMICSTOCKRATIO ( FSCENEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_DYNAMICSTOCKRATIO' AND KSQL_INDNAME = 'IDX_BCM_DYNSTOCKRATIO_YEAR') CREATE INDEX IDX_BCM_DYNSTOCKRATIO_YEAR ON T_BCM_DYNAMICSTOCKRATIO ( FYEARID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_DYNAMICSTOCKRATIO' AND KSQL_INDNAME = 'IDX_BCM_DYNSTOCKRATIO_PERIOD') CREATE INDEX IDX_BCM_DYNSTOCKRATIO_PERIOD ON T_BCM_DYNAMICSTOCKRATIO ( FPERIODID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_DYNAMICSTOCKRATIO' AND KSQL_INDNAME = 'IDX_BCM_DYNSTOCKRATIO_MERGE') CREATE INDEX IDX_BCM_DYNSTOCKRATIO_MERGE ON T_BCM_DYNAMICSTOCKRATIO ( FMERGEID );



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