0

I have an SQL table which has results for each period(e.g. Jan 2013). These are the steps that I follow:

  1. I want to select records from each period.
  2. Put the results into a CSV file.
  3. Then copy the headers and save the CSV file to a text file with different name.
  4. Then take the text file and gzip that file.
  5. Now find the records that are in the text file and create a counts file. (.txt)
  6. Now take that gzip file and counts file and create a .tar file.
  7. Again create a counts file that points to .tar file.

I have to do these steps for all the periods that are in that table.

Is there an easier way to do this, like a Perl/Python script or a Batch file or something?

Chris Forrence
  • 10,042
  • 11
  • 48
  • 64
  • Of course this is (relatively) easy to do with perl, python, php or powershell. Where are you stuck? – fvu Dec 03 '13 at 15:45
  • I dont know anything of perl or phython.. So basically right now I do all this manually. So if you can help me in a psuedo code or point me to a link where I can study and do all this would be great. – user3062077 Dec 03 '13 at 15:57

0 Answers0