/**Begin D:\PDM_UPGRADE\PDM1\HDM_constraint.sql **/
 EXEC P_ALTERPK 'PK_HDM_OLDORGLEADER', 'T_HDM_OLDORGLEADER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_OLDSUPERIOR', 'T_HDM_OLDSUPERIOR', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_NEWORGLEADER', 'T_HDM_NEWORGLEADER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_NEWSUPERIOR', 'T_HDM_NEWSUPERIOR', 'FPKID', '1';

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



/**End D:\PDM_UPGRADE\PDM1\HDM_constraint.sql **/
