Note that there are some explanatory texts on larger screens.

plurals
  1. POElegantly appending a set of strings (.txt file) to another set of strings (.txt also)?
    text
    copied!<p>This request might seem slightly ridiculous, unfortunately however, it is direly needed by my small company and because of this I will be awarding the maximum bounty for a good solution.</p> <p>We have a set of legacy order information stored in a .txt file. In order to import this order information into our new custom database system, we need to, for each row, append on a value from another set.</p> <p>So, in my .txt file I have : </p> <pre><code>Trans Date,NorthTotal,NorthSoFar,SouthTotal,SouthSoFar,IsNorthWorkingDay,IsSouthWorkingDay 2012-01-01,21,0,21,0,0,0 2012-01-02,21,0,21,0,0,0 2012-01-03,21,1,21,1,1,1 ... </code></pre> <p>Now, I have a set of locations in a .txt file also, for which I need to add two columns - city and country. Let's say :</p> <pre><code>City, Country London,England Paris,France </code></pre> <p>For each row in my first text file, I need to append on a row of my second text file! So, for my end result, using my sample data above, I wish to have :</p> <pre><code>Trans Date,NorthTotal,NorthSoFar,SouthTotal,SouthSoFar,IsNorthWorkingDay,IsSouthWorkingDay,City,Country 2012-01-01,21,0,21,0,0,0,London,England 2012-01-02,21,0,21,0,0,0,London,England 2012-01-03,21,1,21,1,1,1,London,England 2012-01-01,21,0,21,0,0,0,Paris,France 2012-01-02,21,0,21,0,0,0,Paris,France 2012-01-03,21,1,21,1,1,1,Paris,France ... </code></pre> <p>At the moment my only idea for this is to import both files into an SQL database and write a complicated function to append the two together (hence my tag) - surely someone can save me and think of something that will not take all day though! Please?! Thank you very much.</p> <p>Edit : I am open to solutions written in all programming languages; but would prefer something which uses DOS or some kind of console/program that can be easily reran!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload