Just thought I would post some sql statements I used recently to convert some rather large simplenews lists into mailchimp. While the statements themselves are just queries you should understand what is happening here before you use these to do an import (disclaimer...).

Anyhow, things you need to know: what data do you need (i.e. just email address for anonymous lists -- email, username and uid for member subscribed lists)... what "tid" your lists are in simplenews - you can find this by going to http://yourserver.com/admin/content/newsletters/types and then mouse over the "edit newsletter" link and you will see something like "https://yourserver.com/admin/content/newsletters/types/edit/230" -- the "230" is the "tid"

The sql statements, then, would need to be run twice for each list changing what scripts you use (one looks for only accounts with no uid on your site (anon) and gives you only the email for import and the other looks for only accounts with a uid (members) and gives you the email, username, and uid) - you can adjust this as necessary....

If you are in phpmyadmin and run these sql statements you can simply export the results (set delimiter to a comma , -- and set surround fields to blank - it's usually "). Then import the list via mailchimp...

Here's the code:

Here tid should be set to yours (from 228 to ?)
This is for site member subscribers and gives their email address, username and uid (Personally I have theme mapped to email, firstname and last name respectively) - change the results as necessary

SELECT simplenews_subscriptions.mail, users.name, simplenews_subscriptions.uid FROM (simplenews_subscriptions LEFT JOIN simplenews_snid_tid ON simplenews_snid_tid.snid = simplenews_subscriptions.snid) LEFT JOIN users ON users.uid = simplenews_subscriptions.uid WHERE simplenews_snid_tid.tid = "228" AND simplenews_subscriptions.uid != "0"

Here tid should be set to yours (from 228 to ?)
This is for anon subscribers and gives just their email address

SELECT simplenews_subscriptions.mail FROM (simplenews_subscriptions LEFT JOIN simplenews_snid_tid ON simplenews_snid_tid.snid = simplenews_subscriptions.snid) LEFT JOIN users ON users.uid = simplenews_subscriptions.uid WHERE simplenews_snid_tid.tid = "228" AND simplenews_subscriptions.uid = "0"

Hope this saves someone some time....

Comments

levelos’s picture

Status:Active» Closed (fixed)
span’s picture

Thanks, this helped alot. Export/import was driving me crazy.

jutulen’s picture

Component:Miscellaneous» General

Thank you! This saved me a lot of time.