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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_SCHEME_FNUMBER') CREATE INDEX IDX_CAS_SCHEME_FNUMBER ON T_CAS_BANKSTAIMPSCHE ( FNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_SCHEME_FNAME') CREATE INDEX IDX_CAS_SCHEME_FNAME ON T_CAS_BANKSTAIMPSCHE ( FNAME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_CAS_SCHEME_FBANKID') CREATE INDEX INDEX_CAS_SCHEME_FBANKID ON T_CAS_BANKSTAIMPSCHE ( FBANKID );


 EXEC P_ALTERPK 'PK_T_CAS_BANKSTAIMPSCHE_L', 'T_CAS_BANKSTAIMPSCHE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_BSISL_FPID') CREATE INDEX IDX_CAS_BSISL_FPID ON T_CAS_BANKSTAIMPSCHE_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_CAS_BANKSTAIMPSCHE_E', 'T_CAS_BANKSTAIMPSCHE_E', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_CAS_BANKSTAIMPSCHE_E_L', 'T_CAS_BANKSTAIMPSCHE_E_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_BSISEE_L_FID') CREATE INDEX IDX_CAS_BSISEE_L_FID ON T_CAS_BANKSTAIMPSCHE_E_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_CAS_BANKSTAFIELDRULE', 'T_CAS_BANKSTAFIELDRULE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_BSFR_FNUMBER') CREATE INDEX IDX_CAS_BSFR_FNUMBER ON T_CAS_BANKSTAFIELDRULE ( FNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_BSFR_FNAME') CREATE INDEX IDX_CAS_BSFR_FNAME ON T_CAS_BANKSTAFIELDRULE ( FNAME );


 EXEC P_ALTERPK 'PK_T_CAS_BANKSTAFIELDRULE_L', 'T_CAS_BANKSTAFIELDRULE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_BSFRL_FPID') CREATE INDEX IDX_CAS_BSFRL_FPID ON T_CAS_BANKSTAFIELDRULE_L ( FID ,FLOCALEID );



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