/**Begin D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
 EXEC P_ALTERPK 'PK_MDS_DATAFETCHENTRY', 'T_MDS_DATAFETCHENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_DATAFETCHENTRY_SOU') CREATE INDEX IDX_MDS_DATAFETCHENTRY_SOU ON T_MDS_DATAFETCHENTRY ( FRESOURCE );


 EXEC P_ALTERPK 'PK_MDS_DATAFETCHSET', 'T_MDS_DATAFETCHSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_DATAFETCHSET_NO') CREATE INDEX IDX_MDS_DATAFETCHSET_NO ON T_MDS_DATAFETCHSET ( FNUMBER );


 EXEC P_ALTERPK 'PK_MDS_DATAFETCHSET_L', 'T_MDS_DATAFETCHSET_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_MDS_TRANSFORM', 'T_MDS_TRANSFORM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_TRANSFORM_NO') CREATE INDEX IDX_MDS_TRANSFORM_NO ON T_MDS_TRANSFORM ( FNUMBER );


 EXEC P_ALTERPK 'PK_MDS_TRANSFORM_L', 'T_MDS_TRANSFORM_L', 'FPKID', '1';

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



/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
