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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ALLOCPLAN_FTRACKNUMBER') CREATE INDEX IDX_ALLOCPLAN_FTRACKNUMBER ON T_POM_ALLOCATIONPLAN ( FTRACKNUMBERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ALLOCPLAN_FCONFIGUREDCODE') CREATE INDEX IDX_ALLOCPLAN_FCONFIGUREDCODE ON T_POM_ALLOCATIONPLAN ( FCONFIGUREDCODEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PORTENTRY_FTRACKNUMBER') CREATE INDEX IDX_PORTENTRY_FTRACKNUMBER ON T_POM_MFTREPORTSUMMARY ( FTRACKNUMBERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PORTENTRY_FCONFIGUREDCODE') CREATE INDEX IDX_PORTENTRY_FCONFIGUREDCODE ON T_POM_MFTREPORTSUMMARY ( FCONFIGUREDCODEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ORDEREN_FTRACKNUMBER') CREATE INDEX IDX_ORDEREN_FTRACKNUMBER ON T_POM_MFTORDERENTRY ( FTRACKNUMBERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ORDEREN_FCONFIGUREDCODE') CREATE INDEX IDX_ORDEREN_FCONFIGUREDCODE ON T_POM_MFTORDERENTRY ( FCONFIGUREDCODEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_XORENTRY_FTRACKNUMBER') CREATE INDEX IDX_XORENTRY_FTRACKNUMBER ON T_POM_XMFTORDERENTRY ( FTRACKNUMBERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_XORENTRY_FCONFIGUREDCODE') CREATE INDEX IDX_XORENTRY_FCONFIGUREDCODE ON T_POM_XMFTORDERENTRY ( FCONFIGUREDCODEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_STOCKEN_FECONFIGUREDCODE') CREATE INDEX IDX_STOCKEN_FECONFIGUREDCODE ON T_POM_MANUSTOCKENTRY ( FENTRYCONFIGUREDCODEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_XSTENTRY_FTRACKNUMBER') CREATE INDEX IDX_XSTENTRY_FTRACKNUMBER ON T_POM_XMANUSTOCKENTRY ( FTRACKNUMBERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_XSTENTRY_FCONFIGUREDCODE') CREATE INDEX IDX_XSTENTRY_FCONFIGUREDCODE ON T_POM_XMANUSTOCKENTRY ( FCONFIGUREDCODEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_XSTENTRY_FECONFIGUREDCODE') CREATE INDEX IDX_XSTENTRY_FECONFIGUREDCODE ON T_POM_XMANUSTOCKENTRY ( FENTRYCONFIGUREDCODEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_STOCK_FTRACKNUMBER') CREATE INDEX IDX_STOCK_FTRACKNUMBER ON T_POM_MFTORDERENTRY_S ( FTRACKNUMBERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_STOCK_FCONFIGUREDCODE') CREATE INDEX IDX_STOCK_FCONFIGUREDCODE ON T_POM_MFTORDERENTRY_S ( FCONFIGUREDCODEID );


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