/**Begin D:\PDM_UPGRADE\PDM1\CAS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_CAS_PAYBANKCHECKFLAG', 'T_CAS_PAYBANKCHECKFLAG', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_PAYBANKCHECKFLAG') CREATE  CLUSTERED INDEX IDX_CAS_PAYBANKCHECKFLAG ON T_CAS_PAYBANKCHECKFLAG ( FEBANKCHECKFLAG );

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


 EXEC P_ALTERPK 'PK_T_CAS_RECBANKCHECKFLAG', 'T_CAS_RECBANKCHECKFLAG', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECBANKCHECKFLAG') CREATE  CLUSTERED INDEX IDX_CAS_RECBANKCHECKFLAG ON T_CAS_RECBANKCHECKFLAG ( FEBANKCHECKFLAG );

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


 EXEC P_ALTERPK 'PK_T_CAS_CLAIMBANKCHECKFLAG', 'T_CAS_CLAIMBANKCHECKFLAG', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_CLAIMBANKCHECKFLAG') CREATE  CLUSTERED INDEX IDX_CAS_CLAIMBANKCHECKFLAG ON T_CAS_CLAIMBANKCHECKFLAG ( FEBANKCHECKFLAG );

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


 EXEC P_ALTERPK 'PK_T_CAS_JOURNALBANKCHECK', 'T_CAS_JOURNALBANKCHECK', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_JOURNALBANKCHECKFLAG') CREATE  CLUSTERED INDEX IDX_CAS_JOURNALBANKCHECKFLAG ON T_CAS_JOURNALBANKCHECK ( FEBANKCHECKFLAG );

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


 EXEC P_ALTERPK 'PK_T_CAS_CASHJOUBANKCHECK', 'T_CAS_CASHJOUBANKCHECK', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_CASHJBANKCHECKFLAG') CREATE  CLUSTERED INDEX IDX_CAS_CASHJBANKCHECKFLAG ON T_CAS_CASHJOUBANKCHECK ( FEBANKCHECKFLAG );

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



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