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

 EXEC P_ALTERPK 'PK_T_BD_LINETYPE', 'T_BD_LINETYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_BD_LINETYPE_L', 'T_BD_LINETYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BD_LINETYPEENTRY', 'T_BD_LINETYPEENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_BD_LINETYPEENTRY_FID') CREATE INDEX INDEX_BD_LINETYPEENTRY_FID ON T_BD_LINETYPEENTRY ( FID );


 EXEC P_ALTERPK 'PK_T_BD_SERVICEATTRIBUTE_L', 'T_BD_SERVICEATTRIBUTE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BD_SERVICEATTRIBUTE', 'T_BD_SERVICEATTRIBUTE', 'FID', '1';

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



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