/**Begin D:\PDM_UPGRADE\PDM1\BEI_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BEI_MISSRECORD', 'T_BEI_MISSRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_MISSRECORD_1') CREATE INDEX IDX_BEI_MISSRECORD_1 ON T_BEI_MISSRECORD ( FACCOUNTBANKID ,FBIZDATE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_MISSRECORD_2') CREATE INDEX IDX_BEI_MISSRECORD_2 ON T_BEI_MISSRECORD ( FCOMPANYID ,FBIZDATE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_MISSRECORD_3') CREATE INDEX IDX_BEI_MISSRECORD_3 ON T_BEI_MISSRECORD ( FBIZDATE );


 EXEC P_ALTERPK 'PK_T_BEI_MISSRECORDLOG', 'T_BEI_MISSRECORDLOG', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_MISSRECORDLOG') CREATE INDEX IDX_BEI_MISSRECORDLOG ON T_BEI_MISSRECORDLOG ( FID );



/**End D:\PDM_UPGRADE\PDM1\BEI_constraint.sql **/
