/**Begin D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\BDM_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BDM_SPLIT_RULE_MASTERID') CREATE INDEX IDX_BDM_SPLIT_RULE_MASTERID ON T_BDM_INV_SPLIT_RULE ( FMASTERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BDM_SPLIT_RULE_CREATEORG') CREATE INDEX IDX_BDM_SPLIT_RULE_CREATEORG ON T_BDM_INV_SPLIT_RULE ( FORG );

 EXEC P_ALTERPK 'PK_T_BDM_INV_SPLIT_RULE_L', 'T_BDM_INV_SPLIT_RULE_L', 'FPKID', '0';

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



/**End D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\BDM_constraint.sql **/
