/**Begin D:\PDM_UPGRADE\PDM1\HDM_constraint.sql **/
 EXEC P_ALTERPK 'PK_HDM_SECDREASON', 'T_HDM_SECDREASON', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HDM_SECDREASON' AND KSQL_INDNAME = 'IDX_HDM_SECDREASON_NUMBER') CREATE INDEX IDX_HDM_SECDREASON_NUMBER ON T_HDM_SECDREASON ( FNUMBER );


 EXEC P_ALTERPK 'PK_HDM_SECDREASON_L', 'T_HDM_SECDREASON_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_SECDBACKREASON', 'T_HDM_SECDBACKREASON', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HDM_SECDBACKREASON' AND KSQL_INDNAME = 'IDX_HDM_SECDBACKREASON_NUMBER') CREATE INDEX IDX_HDM_SECDBACKREASON_NUMBER ON T_HDM_SECDBACKREASON ( FNUMBER );


 EXEC P_ALTERPK 'PK_HDM_SECDBACKREASON_L', 'T_HDM_SECDBACKREASON_L', 'FPKID', '1';

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



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