/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/
 EXEC P_ALTERPK 'PK_CTS_ADDRESS', 'T_CTS_ADDRESS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CTS_ADDR_FADMIN') CREATE INDEX IDX_CTS_ADDR_FADMIN ON T_CTS_ADDRESS ( FCOUNTRYID ,FADMINDIVISIONID1 ,FADMINDIVISIONID2 ,FADMINDIVISIONID3 );


 EXEC P_ALTERPK 'PK_CTS_ADDRESSCONFIG', 'T_CTS_ADDRESSCONFIG', 'FID', '1';

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




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