/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SRC_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_VIE_DETAIL_TYPE') CREATE INDEX IDX_SRC_VIE_DETAIL_TYPE ON T_SRC_VIE_DETAIL ( FSUPPLIERTYPE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_VIE_DETAIL_PID') CREATE INDEX IDX_SRC_VIE_DETAIL_PID ON T_SRC_VIE_DETAIL ( FPURLISTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_VIE_DETAIL_TURN') CREATE INDEX IDX_SRC_VIE_DETAIL_TURN ON T_SRC_VIE_DETAIL ( FTURNS );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_VIE_DETAIL_VIETURN') CREATE INDEX IDX_SRC_VIE_DETAIL_VIETURN ON T_SRC_VIE_DETAIL ( FVIETURNS );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_VIE_DETAIL_TIME') CREATE INDEX IDX_SRC_VIE_DETAIL_TIME ON T_SRC_VIE_DETAIL ( FQUOTEDATE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_VIE_TURNS_TURN') CREATE INDEX IDX_SRC_VIE_TURNS_TURN ON T_SRC_VIE_TURNS ( FTURNS );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_VIE_TURNS_VIETRURN') CREATE INDEX IDX_SRC_VIE_TURNS_VIETRURN ON T_SRC_VIE_TURNS ( FVIETURNS );


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