{"id":142,"date":"2007-06-06T08:20:44","date_gmt":"2007-06-06T15:20:44","guid":{"rendered":"http:\/\/messofpottage.com\/blog\/?p=142"},"modified":"2007-06-06T08:20:44","modified_gmt":"2007-06-06T15:20:44","slug":"re-learning-sql","status":"publish","type":"post","link":"https:\/\/accretiondisc.com\/blog\/2007\/06\/06\/re-learning-sql\/","title":{"rendered":"(Re) Learning SQL"},"content":{"rendered":"<p>We have like 12 different databases at work. Most of them are <a href=\"http:\/\/en.wikipedia.org\/wiki\/Microsoft_Word\">Word<\/a> documents. I&#8217;d like them all to be in (say) <a href=\"http:\/\/en.wikipedia.org\/wiki\/Microsoft_Excel\">Excel<\/a> files so that we can (for example) easily make mailing address labels. (Our current mailing label database started life that way, I think, but the Excel data has been lost, and the Word document with the mailing labels has been updated by hand ever since.)<\/p>\n<p>This offends me. It drives me nuts. And in my copious spare time I&#8217;m trying to get them all into tabular data sets that can be imported into Excel. I&#8217;ve done most of that work, courtesy of <a href=\"http:\/\/www.winfield.demon.nl\/\">antiword<\/a> and a lot of <a href=\"http:\/\/www.ruby-lang.org\/\">ruby<\/a> scripting.<\/p>\n<p>Now I just need to merge columns A, C, and G from one file with columns B, T, and Q from another file. Times a dozen files. That, my friend, is a job for a database <a href=\"http:\/\/en.wikipedia.org\/wiki\/SQL\">query language<\/a>.<\/p>\n<p>Back when I worked for the start-up, I used to know how those work. So now I&#8217;m dusting off what little I knew, and creating scripts to convert the tabular data files into SQL update commands I can send to a <a href=\"http:\/\/www.mysql.com\/\">MySQL<\/a> database.<\/p>\n<p>Fun. But slow going. I expect to be done in September. November at the latest.<\/p>\n<p><strong>Update.<\/strong> In the ensuing six years, I had forgotten about the <code>LOAD DATA<\/code> command. Getting the data into tabular format (above) was all I needed to do. Cool.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have like 12 different databases at work. Most of them are Word documents. I&#8217;d like them all to be in (say) Excel files so that we can (for example) easily make mailing address labels. (Our current mailing label database started life that way, I think, but the Excel data has been lost, and the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6,23,52],"tags":[],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-christianity","category-life","category-technology"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paRqpr-2i","_links":{"self":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":0,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"wp:attachment":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}