/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TPO_constraint.sql **/
 EXEC P_ALTERPK 'PK_TPO_TCSD_TAXRATE', 'T_TPO_TCSD_TAXRATE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TCSD_TAXRATE_L', 'T_TPO_TCSD_TAXRATE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TCSD_TAXRATEENTRY', 'T_TPO_TCSD_TAXRATEENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TPO_TCSD_TAXRATEENTRY_L', 'T_TPO_TCSD_TAXRATEENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TPO_TCSD_TAXRATEENTRY_L_0') CREATE INDEX IDX_TPO_TCSD_TAXRATEENTRY_L_0 ON T_TPO_TCSD_TAXRATEENTRY_L ( FENTRYID ,FLOCALEID );



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