/**Begin D:\PDM_UPGRADE\PDM1\CAS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_CAS_RECBILLCHANG', 'T_CAS_RECBILLCHANG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECECHG_DATEORG') CREATE INDEX IDX_CAS_RECECHG_DATEORG ON T_CAS_RECBILLCHANG ( FBIZDATE ,FORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECECHG_BILLNO') CREATE INDEX IDX_CAS_RECECHG_BILLNO ON T_CAS_RECBILLCHANG ( FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECECHG_STATUSORGID') CREATE INDEX IDX_CAS_RECECHG_STATUSORGID ON T_CAS_RECBILLCHANG ( FBILLSTATUS ,FORGID );


 EXEC P_ALTERPK 'PK_T_CAS_RECBILLCHANG_E', 'T_CAS_RECBILLCHANG_E', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECECHG_E') CREATE INDEX IDX_CAS_RECECHG_E ON T_CAS_RECBILLCHANG_E ( FREFUNDBATCHSEQID );


 EXEC P_ALTERPK 'PK_T_CAS_RECBILLCHANGENTRY', 'T_CAS_RECBILLCHANGENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_CAS_RECBILLCHANGBENTRY', 'T_CAS_RECBILLCHANGBENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_CAS_RECCHGSETTLEENTRY', 'T_CAS_RECCHGSETTLEENTRY', 'FENTRYID', '1';

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



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