/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BASE_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_MATERIAL_SP') CREATE INDEX IDX_T_BD_MATERIAL_SP ON T_BD_MATERIAL ( FSIMPLEPINYIN );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_EIL_FFNM') CREATE INDEX IDX_ER_EIL_FFNM ON T_ER_EXPENSEITEM_L ( FFULLNAME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_EIL_FNM') CREATE INDEX IDX_ER_EIL_FNM ON T_ER_EXPENSEITEM_L ( FNAME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_EIL_FL') CREATE INDEX IDX_ER_EIL_FL ON T_ER_EXPENSEITEM_L ( FLOCALEID );

EXEC p_DropIdx 'IDX_BD_ERDEPT_ORG_EXP', 'T_BD_EXPITEMRELDEPT';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_ERO_EXP') CREATE INDEX IDX_BD_ERO_EXP ON T_BD_EXPITEMRELDEPT ( FEXPITEMID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_ERO_ORG') CREATE INDEX IDX_BD_ERO_ORG ON T_BD_EXPITEMRELDEPT ( FRELORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_SUPPLIER_SP') CREATE INDEX IDX_T_BD_SUPPLIER_SP ON T_BD_SUPPLIER ( FSIMPLEPINYIN );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_CUSTOMER_SP') CREATE INDEX IDX_T_BD_CUSTOMER_SP ON T_BD_CUSTOMER ( FSIMPLEPINYIN );


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