SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 142 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. delete from evNetScripts where scriptname = 'Level0BallotData';
  2. INSERT INTO `evNetScripts` (`ScriptName`, `ScriptCaption`, `ScriptStatements`, `ScriptInfo`) VALUES ('Level0BallotData', 'Load Level 0 Ballot Data', '{"Delete Temp Ballot Table":{"Script":"Drop Table if exists temp_BallotStyles;","Type":"MySQL","Description":"Deleting Temp BallotTable"},"Create Temp Ballot Table":{"Script":"CREATE TABLE `temp_BallotStyles` (\\r\\n\\t`PP` VARCHAR(50) NULL DEFAULT NULL,\\r\\n\\t`SEQ` VARCHAR(50) NULL DEFAULT NULL,\\r\\n\\t`PREC` VARCHAR(50) NULL DEFAULT NULL,\\r\\n\\t`SPLIT` VARCHAR(50) NULL DEFAULT NULL,\\r\\n\\t`Blank` VARCHAR(50) NULL DEFAULT NULL\\r\\n)\\r\\nCOLLATE=\'latin1_swedish_ci\'\\r\\nENGINE=InnoDB\\r\\n;\\r\\n","Type":"MySQL","Description":"Creating Temp Ballot Table"},"Load data to Temp Ballot Table":{"Script":"rename  FilePath\\\\BallotData.txt temp_BallotStyles.txt\\r\\n mysqlimport --host=\\"@host\\" --user=\\"@user\\" --password=\\"@password\\" --local --ignore-lines=1 --delete --fields-terminated-by=\\"\\\\t\\" --lines-terminated-by=\\"\\\\r\\\\n\\" --fields-escaped-by=\\"\\" @database  FilePath\\\\temp_BallotStyles.txt\\r\\nFor /f \\"tokens=2-4 delims=/ \\" %%a in (\'date /t\') do (set mydate=%%c-%%a-%%b)\\r\\nFor /f \\"tokens=1-3 delims=/:/ \\" %%a in (\'time /t\') do (set mytime=%%a:%%b:00)\\r\\nset SaveTime=%mydate:-=%_%mytime::=%\\r\\nrename  FilePath\\\\temp_Ballot.txt BallotData_ProcessedLevel0_%SaveTime%.txt","Type":"CMD","Description":"Loading Data to Temp Ballot Table"},"Update ballot styles":{"Script":"update VoterLookupDetail A inner join temp_VoterLookupDetail B on A.StateVoterID = B.VoterID\\r\\ninner join temp_BallotStyles C on B.PrecinctNumber = C.Prec and C.Split = \'CO\'\\r\\nset A.BallotStyle = CONCAT(C.PREC, \'-\', C.SPLIT);\\r\\n\\r\\nupdate VoterLookupDetail A inner join temp_VoterLookupDetail B on A.StateVoterID = B.VoterID\\r\\ninner join temp_BallotStyles C on B.PrecinctNumber = C.Prec and C.SPLIT = \'CITY\' and B.CityCode <> \'\'\\r\\nset A.BallotStyle = CONCAT(C.PREC, \'-\', C.SPLIT);","Type":"MySQL","Description":"Updating ballot styles"}}', 'Level0');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top