/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_constraint.sql **/

 EXEC P_ALTERPK 'PK_HPDI_FIELDRULE_L', 'T_HPDI_FIELDRULE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_FIELDRULE_L' AND KSQL_INDNAME = 'IDX_HPDI_FIELDRULE_L') CREATE INDEX IDX_HPDI_FIELDRULE_L ON T_HPDI_FIELDRULE_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HPDI_FIELDRULE', 'T_HPDI_FIELDRULE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_FIELDRULE' AND KSQL_INDNAME = 'IDX_HPDI_FIELDRULE_NUM') CREATE INDEX IDX_HPDI_FIELDRULE_NUM ON T_HPDI_FIELDRULE ( FNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HPDI_FIELDRULE' AND KSQL_INDNAME = 'IDX_HPDI_FIELDRULE_POL') CREATE INDEX IDX_HPDI_FIELDRULE_POL ON T_HPDI_FIELDRULE ( FPOLICYID );



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