/**Begin D:\PDM_UPGRADE\PDM1\POM_constraint.sql **/
 EXEC P_ALTERPK 'PK_IM_MDC_SHDIFSHAREDETAIL', 'T_IM_MDC_SHDIFSHAREDETAIL', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_IM_MDC_SHAREDETAIL_A') CREATE INDEX IDX_T_IM_MDC_SHAREDETAIL_A ON T_IM_MDC_SHDIFSHAREDETAIL ( FSHDIFFSHAREID );


 EXEC P_ALTERPK 'PK_IM_MDC_MFTBACKDIFSHARE', 'T_IM_MDC_MFTBACKDIFSHARE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_IM_MDC_INVBACKDIFSHARE', 'T_IM_MDC_INVBACKDIFSHARE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_IM_MDC_DIFSHARELOGENTRY', 'T_IM_MDC_DIFSHARELOGENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_IM_MDC_DIFSHARELOG', 'T_IM_MDC_DIFSHARELOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_MDC_DIFSHARELOG') CREATE INDEX IDX_IM_MDC_DIFSHARELOG ON T_IM_MDC_DIFSHARELOG ( FDIFFSHAREID );


 EXEC P_ALTERPK 'PK_IM_MDC_DIFSHAREDETAIL', 'T_IM_MDC_DIFSHAREDETAIL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_IM_MDC_DIFSHAREDETAIL') CREATE INDEX IDX_T_IM_MDC_DIFSHAREDETAIL ON T_IM_MDC_DIFSHAREDETAIL ( FDIFFSHAREID );


 EXEC P_ALTERPK 'PK_IM_MDC_BACKDIFSHARE', 'T_IM_MDC_BACKDIFSHARE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_IM_MDC_BACKDIFSHARE') CREATE INDEX IDX_T_IM_MDC_BACKDIFSHARE ON T_IM_MDC_BACKDIFSHARE ( FBILLNO );



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