/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_constraint.sql **/


 EXEC P_ALTERPK 'PK_IM_MDC_MFTREQBILLS', 'T_IM_MDC_MFTREQBILLS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDC_MFTREQBILLS_FORGID') CREATE INDEX IDX_MDC_MFTREQBILLS_FORGID ON T_IM_MDC_MFTREQBILLS ( FORGID );

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


 EXEC P_ALTERPK 'PK_IM_MDC_MFTREQBILLS_L', 'T_IM_MDC_MFTREQBILLS_L', 'FPKID', '1';

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

 
 
 EXEC P_ALTERPK 'PK_IM_MDC_MFTREQENTRY', 'T_IM_MDC_MFTREQENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDC_REQ_FMATERIELMASTERID') CREATE INDEX IDX_MDC_REQ_FMATERIELMASTERID ON T_IM_MDC_MFTREQENTRY ( FMATERIELMASTERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDC_REQ_FMAINBILLID') CREATE INDEX IDX_MDC_REQ_FMAINBILLID ON T_IM_MDC_MFTREQENTRY ( FMAINBILLID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDC_REQ_FMAINBILLENTRYID') CREATE INDEX IDX_MDC_REQ_FMAINBILLENTRYID ON T_IM_MDC_MFTREQENTRY ( FMAINBILLENTRYID );

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



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_constraint.sql **/
