/**Begin D:\DBA\1.4\PDM_UPGRADE\PDM1\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_RULEHELPERCATALOG', 'T_BCM_RULEHELPERCATALOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_RULEHELPERCATALOG' AND KSQL_INDNAME = 'IDX_BCM_RULEHELPERCATALOG_NN') CREATE INDEX IDX_BCM_RULEHELPERCATALOG_NN ON T_BCM_RULEHELPERCATALOG ( FNUMBER ,FNAME );


 EXEC P_ALTERPK 'PK_T_BCM_RULEHELPERCATALOG_L', 'T_BCM_RULEHELPERCATALOG_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_RULEHELPERCATALOG_L' AND KSQL_INDNAME = 'IDX_BCM_RULEHELPERCATALOG_L') CREATE INDEX IDX_BCM_RULEHELPERCATALOG_L ON T_BCM_RULEHELPERCATALOG_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BCM_RULEHELPERITEM_L', 'T_BCM_RULEHELPERITEM_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_RULEHELPERITEM_L' AND KSQL_INDNAME = 'IDX_BCM_RULEHELPERITEM_L') CREATE INDEX IDX_BCM_RULEHELPERITEM_L ON T_BCM_RULEHELPERITEM_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BCM_RULEHELPERITEM', 'T_BCM_RULEHELPERITEM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_RULEHELPERITEM' AND KSQL_INDNAME = 'IDX_BCM_RULEHELPERITEM_NN') CREATE INDEX IDX_BCM_RULEHELPERITEM_NN ON T_BCM_RULEHELPERITEM ( FNUMBER ,FNAME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BCM_RULEHELPERITEM' AND KSQL_INDNAME = 'IDX_BCM_RULEHELPERITEM_CATALO') CREATE INDEX IDX_BCM_RULEHELPERITEM_CATALO ON T_BCM_RULEHELPERITEM ( FCATALOGID );



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