/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HBSS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HBSS_PATENTSTATUS', 'T_HBSS_PATENTSTATUS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PATENTSTATUS_L', 'T_HBSS_PATENTSTATUS_L', 'FPKID', '1';

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



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