/**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_AGENTBANKCHECKFLAG', 'T_CAS_AGENTBANKCHECKFLAG', 'FENTRYID', '0';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_AGENTBC_FID') CREATE INDEX IDX_CAS_AGENTBC_FID ON T_CAS_AGENTBANKCHECKFLAG ( 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 );


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