/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_constraint.sql **/
 EXEC P_ALTERPK 'PK_ER_TRIPCITY_L', 'T_ER_TRIPCITY_L', 'FPKID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_TRIPCITY_L_FNAME') CREATE INDEX IDX_ER_TRIPCITY_L_FNAME ON T_ER_TRIPCITY_L ( FNAME );


 EXEC P_ALTERPK 'PK_ER_TRIPCITY', 'T_ER_TRIPCITY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_TRIPCITY_CODE') CREATE INDEX IDX_ER_TRIPCITY_CODE ON T_ER_TRIPCITY ( FCODE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_TRIPCITY_CITYID') CREATE INDEX IDX_ER_TRIPCITY_CITYID ON T_ER_TRIPCITY ( FCITYID );



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