/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_CAS_RECONCILIATIONRULE_L', 'T_CAS_RECONCILIATIONRULE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_CAS_RECPAYRULE_UORG', 'T_CAS_RECPAYRULE_UORG', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECPAYRULE_UORG') CREATE  CLUSTERED INDEX IDX_CAS_RECPAYRULE_UORG ON T_CAS_RECPAYRULE_UORG ( FUORGID );


 EXEC P_ALTERPK 'PK_T_CAS_SMARTMATCH_UORG', 'T_CAS_SMARTMATCH_UORG', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_SMARTMATCH_UORG') CREATE  CLUSTERED INDEX IDX_CAS_SMARTMATCH_UORG ON T_CAS_SMARTMATCH_UORG ( FUORGID );



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