/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_EB_BGCONTROLOPERLOG', 'T_EB_BGCONTROLOPERLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_EB_BGCONTROLOPERLOG') CREATE INDEX IX_EB_BGCONTROLOPERLOG ON T_EB_BGCONTROLOPERLOG ( FENTITYNUMBER ,FCREATEDATE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_EB_BGCONTROLOL_BT') CREATE INDEX IX_EB_BGCONTROLOL_BT ON T_EB_BGCONTROLOPERLOG ( FBILLID ,FCREATEDATE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_EB_BGCONTROLOL_BN') CREATE INDEX IX_EB_BGCONTROLOL_BN ON T_EB_BGCONTROLOPERLOG ( FBILLNUMBER ,FCREATEDATE );


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_BGCONTROLRECORD_EXTBIZ') CREATE INDEX IDX_EB_BGCONTROLRECORD_EXTBIZ ON T_EB_BGCONTROLRECORD ( FEXTBIZID );


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