/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PUR_constraint.sql **/
EXEC p_DropIdx 'IDX_PUR_CR_FSRCENTRYID', 'T_PUR_CHECKRELATION';
EXEC p_DropIdx 'IDX_PUR_CR_FTARENTRYID', 'T_PUR_CHECKRELATION';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_CR_FSRCENTRYID') CREATE INDEX IDX_PUR_CR_FSRCENTRYID ON T_PUR_CHECKRELATION ( FSRCENTRYID ,FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_CR_FTARENTRYID') CREATE INDEX IDX_PUR_CR_FTARENTRYID ON T_PUR_CHECKRELATION ( FTARENTRYID ,FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_ORDERCHECK_FPOENTRYID') CREATE INDEX IDX_PUR_ORDERCHECK_FPOENTRYID ON T_PUR_ORDERCHECK ( FPOENTRYID );


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