/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_constraint.sql **/
 EXEC P_ALTERPK 'PK_CAS_CASHVERIFIADJENTRY', 'T_CAS_CASHVERIFIADJENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_CAS_CASHVERIFICATION', 'T_CAS_CASHVERIFICATION', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_CASHVERIFI_FORGID') CREATE INDEX IDX_CAS_CASHVERIFI_FORGID ON T_CAS_CASHVERIFICATION ( FORGID );


 EXEC P_ALTERPK 'PK_CAS_CURRENCYFACEVALUE', 'T_CAS_CURRENCYFACEVALUE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_CCYFV_FCURRENCYID') CREATE INDEX IDX_CAS_CCYFV_FCURRENCYID ON T_CAS_CURRENCYFACEVALUE ( FCURRENCYID );


 EXEC P_ALTERPK 'PK_CAS_CURRENCYFACEVALUE_L', 'T_CAS_CURRENCYFACEVALUE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_CAS_CURRENCYFVENTRY', 'T_CAS_CURRENCYFVENTRY', 'FENTRYID', '1';

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


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_CLAIMNOTICEBILL_MER') CREATE INDEX IDX_CAS_CLAIMNOTICEBILL_MER ON T_CAS_CLAIMNOTICEBILL ( FMARGEID );

 EXEC P_ALTERPK 'PK_CAS_CASHVERIFICASHENTRY', 'T_CAS_CASHVERIFICASHENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_CV_FCURRENCYFVENTRYID') CREATE INDEX IDX_CAS_CV_FCURRENCYFVENTRYID ON T_CAS_CASHVERIFICASHENTRY ( FCURRENCYFVENTRYID );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_constraint.sql **/
