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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_RECEIPTQUERYSCHEME') CREATE INDEX IDX_BEI_RECEIPTQUERYSCHEME ON T_BEI_RECEIPTQUERYSCHEME ( FSOURCEBILLTYPE ,FNUMBER );


 EXEC P_ALTERPK 'PK_T_BEI_RECEIPTQUERYSCHEME_L', 'T_BEI_RECEIPTQUERYSCHEME_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_RECEIPTQUERYSCHEME_L') CREATE INDEX IDX_BEI_RECEIPTQUERYSCHEME_L ON T_BEI_RECEIPTQUERYSCHEME_L ( FLOCALEID ,FNAME );


  EXEC P_ALTERPK 'PK_T_BEI_RECEIPTSCHEME_E', 'T_BEI_RECEIPTSCHEME_E', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_RECEIPTSCHEME_E') CREATE INDEX IDX_BEI_RECEIPTSCHEME_E ON T_BEI_RECEIPTSCHEME_E ( FSOURCEBILLNAME ,FTARGETBILLAPP ,FQUERYRULE );


 EXEC P_ALTERPK 'PK_T_BEI_FUNDBILLTYPE', 'T_BEI_FUNDBILLTYPE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_FUNDBILLTYPE') CREATE INDEX IDX_BEI_FUNDBILLTYPE ON T_BEI_FUNDBILLTYPE ( FNUMBER ,FNAME );


 EXEC P_ALTERPK 'PK_T_BEI_FUNDBILLTYPE_L', 'T_BEI_FUNDBILLTYPE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_FUNDBILLTYPE_L') CREATE INDEX IDX_BEI_FUNDBILLTYPE_L ON T_BEI_FUNDBILLTYPE_L ( FLOCALEID ,FNAME );



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