/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PDM_constraint.sql **/
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOM_FNUMBER') CREATE INDEX IDX_PDM_MFTBOM_FNUMBER on T_PDM_MFTBOM (FNUMBER ASC);
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOM_L_FID') CREATE INDEX IDX_PDM_MFTBOM_L_FID ON T_PDM_MFTBOM_L (FID,FLOCALEID);

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMENTRY_FID') CREATE INDEX IDX_PDM_MFTBOMENTRY_FID ON T_PDM_MFTBOMENTRY (FID ASC);

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMENTRY_L_FID') CREATE INDEX IDX_PDM_MFTBOMENTRY_L_FID ON T_PDM_MFTBOMENTRY_L (FENTRYID,FLOCALEID);

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMCOPENTRY_FID') CREATE INDEX IDX_PDM_MFTBOMCOPENTRY_FID ON T_PDM_MFTBOMCOPENTRY (FID ASC);

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMCOPENTRY_L_EL') CREATE INDEX IDX_PDM_MFTBOMCOPENTRY_L_EL ON T_PDM_MFTBOMCOPENTRY_L (FENTRYID,FLOCALEID);

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMQTYENTRY_FK') CREATE INDEX IDX_PDM_MFTBOMQTYENTRY_FK ON T_PDM_MFTBOMQTYENTRY (FENTRYID ASC);

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMSETUPENTRY_FK') CREATE INDEX IDX_PDM_MFTBOMSETUPENTRY_FK ON T_PDM_MFTBOMSETUPENTRY (FENTRYID ASC);

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMSETUPENTRY_L_EL') CREATE INDEX IDX_PDM_MFTBOMSETUPENTRY_L_EL ON T_PDM_MFTBOMSETUPENTRY_L (FDETAILID,FLOCALEID);
 
 
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PDM_constraint.sql **/
