Created
August 18, 2017 15:53
-
-
Save tomredsky/f81349e3ed6942bf22a809414a63a1b6 to your computer and use it in GitHub Desktop.
SQL script to update contacts with dotmailer IDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS dm_temp; | |
CREATE TABLE dm_temp( | |
id int unique not null, | |
email varchar(256) unique not null, | |
status varchar(64) | |
); | |
COPY dm_temp FROM '/tmp/contacts.csv' WITH CSV; | |
BEGIN; | |
UPDATE mn set dotmailer_id=( select id from dm_temp where mn.eml=email); | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment