Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Bulk delete entries from Mail.app Previous Recipients using sqlite3' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Bulk delete entries from Mail.app Previous Recipients using sqlite3
Authored by: da2357 on May 23, '11 09:34:11AM
Good tip, thanks! The GUI in Mail.app doesn't allow you to edit a name, so you can easily run a few more SQL commands to update a record. First, I'll visually confirm the record I want to update with SELECT, issue two UPDATE commands to change first and last name, re-confirm the change and exit:
[bash]$ sqlite3 "~/Library/Application Support/AddressBook/MailRecents-v4.abcdmr"
SQLite version 3.7.3
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select ZFIRSTNAME,ZLASTNAME,ZEMAIL from ZABCDMAILRECENT where ZEMAIL like 'johnsmith@somewhere.com';
||johnsmith@somewhere.com
sqlite> update ZABCDMAILRECENT set ZFIRSTNAME = 'John' where ZEMAIL like 'johnsmith@somewhere.com';
sqlite> update ZABCDMAILRECENT set ZLASTNAME = 'Smith' where ZEMAIL like 'johnsmith@somewhere.com';
sqlite> select ZFIRSTNAME,ZLASTNAME,ZEMAIL from ZABCDMAILRECENT where ZEMAIL like 'johnsmith@somewhere.com';
John|Smith|johnsmith@somewhere.com
sqlite> .quit


[ Reply to This | # ]