I have 2 similar tables. If_idx is the key. I am trying to synchronize the 
rows. Is there one sql statement to delete the extra row or 2 statements to get 
the result for the extra if_idx, 29 and then delete it from the table 
lldp_stats_tx_port_table_clear.

PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE lldp_stats_tx_port_table (
    if_idx                    INTEGER,
    dest_addr_idx             INTEGER,
    frames_out_total          INTEGER,
    lldpdu_len_errors         INTEGER,
    UNIQUE (if_idx, dest_addr_idx) ON CONFLICT REPLACE);
INSERT INTO "lldp_stats_tx_port_table" VALUES(58,1,2180,0);
INSERT INTO "lldp_stats_tx_port_table" VALUES(53,1,2180,0);
INSERT INTO "lldp_stats_tx_port_table" VALUES(43,1,2177,0);
COMMIT;

PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE lldp_stats_tx_port_table_clear(
  if_idx INT,
  dest_addr_idx INT,
  frames_out_total INT,
  lldpdu_len_errors INT
);
INSERT INTO "lldp_stats_tx_port_table_clear" VALUES(58,1,53,0);
INSERT INTO "lldp_stats_tx_port_table_clear" VALUES(53,1,53,0);
INSERT INTO "lldp_stats_tx_port_table_clear" VALUES(43,1,51,0);
INSERT INTO "lldp_stats_tx_port_table_clear" VALUES(29,1,53,0);
COMMIT;


This email and attachments may contain privileged or confidential information 
intended only for the addressee(s) indicated. The sender does not waive any of 
its rights, privileges or protections respecting this information. If you are 
not the named addressee, an employee, or agent responsible for sending this 
message to the named addressee (or this message was received by mistake), you 
are not authorized to read, print, retain, copy or disseminate this message or 
any part of it. If received in error, please notify us immediately by e-mail, 
discard any paper copies and delete all electronic files of the email.

Computer viruses can be transmitted via email. The recipient should check this 
email and any attachments for viruses. Email transmission cannot be guaranteed 
to be secured or error-free as information could be intercepted, corrupted, 
lost, destroyed, arrive late or incomplete, or contain viruses. The sender 
accepts no liability for any damage caused by any transmitted viruses or errors 
or omissions in the contents of this message.

Overture Networks, Inc. 637 Davis Drive, Morrisville, NC USA 27560 
www.overturenetworks.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to