EXEC P_ALTERPK 'PK_BD_SUPPLIERNH_FENTRYID', 'T_BD_SUPPLIERNH', 'FENTRYID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_SUPPLIERNH_FID') CREATE INDEX IDX_T_BD_SUPPLIERNH_FID ON T_BD_SUPPLIERNH ( FID );
EXEC P_ALTERPK 'PK_T_BD_SUPPLIERNH_L_FPKID', 'T_BD_SUPPLIERNH_L', 'FPKID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_SUPPLIERNH_L') CREATE INDEX IDX_T_BD_SUPPLIERNH_L ON T_BD_SUPPLIERNH_L ( FENTRYID ,FLOCALEID );

EXEC P_ALTERPK 'PK_BD_CUSTOMERNH_FENTRYID', 'T_BD_CUSTOMERNH', 'FENTRYID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_CUSTOMERNH_FID') CREATE INDEX IDX_T_BD_CUSTOMERNH_FID ON T_BD_CUSTOMERNH ( FID );
EXEC P_ALTERPK 'PK_T_BD_CUSTOMERNH_L_FPKID', 'T_BD_CUSTOMERNH_L', 'FPKID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_CUSTOMERNH_L') CREATE INDEX IDX_T_BD_CUSTOMERNH_L ON T_BD_CUSTOMERNH_L ( FENTRYID ,FLOCALEID );


EXEC p_DropIdx 'IDX_T_BD_BIZPARTNERNH_FID', 'T_BD_BIZPARTNERNH'; 
EXEC p_DropIdx 'IDX_T_BD_BIZPARTNERNH_L', 'T_BD_BIZPARTNERNH_L';
EXEC p_DropIdx 'IDX_T_BD_BIZPARTNERNH_FK', 'T_BD_BIZPARTNERNH';
EXEC p_DropIdx 'IDX_T_BD_BIZPARTNERNH_L_0', 'T_BD_BIZPARTNERNH_L';

EXEC P_ALTERPK 'PK_BD_BIZPARTNERNH_FENTRYID', 'T_BD_BIZPARTNERNH', 'FENTRYID', '1';
EXEC P_ALTERPK 'PK_T_BD_BIZPARTNERNH_L_FPKID', 'T_BD_BIZPARTNERNH_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_BIZPARTNERNH_FK') CREATE INDEX IDX_BD_BIZPARTNERNH_FK ON T_BD_BIZPARTNERNH ( FID );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_BIZPARTNERNH_L_0') CREATE INDEX IDX_BD_BIZPARTNERNH_L_0 ON T_BD_BIZPARTNERNH_L ( FENTRYID ,FLOCALEID );

