/**Begin D:\PDM\pdm_upgrade\pdm1\ER2_constraint.sql **/
EXEC P_ALTERPK 'PK_T_ER_STAKEHOLDERBILL_L', 'T_ER_STAKEHOLDERBILL_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_ER_STAKEHOLDERBILL_LK', 'T_ER_STAKEHOLDERBILL_LK', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_STAKEHOLDERBILL_LK_FK') CREATE INDEX IDX_ER_STAKEHOLDERBILL_LK_FK ON T_ER_STAKEHOLDERBILL_LK ( FID );


EXEC P_ALTERPK 'PK_T_ER_STAKEHOLDERDETAIL_LK', 'T_ER_STAKEHOLDERDETAIL_LK', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_STAKEHOLDERDETAIL_LK_FK') CREATE INDEX IDX_ER_STAKEHOLDERDETAIL_LK_FK ON T_ER_STAKEHOLDERDETAIL_LK ( FDETAILID );



/**End D:\PDM\pdm_upgrade\pdm1\ER2_constraint.sql **/
