I have an SQL table which has results for each period(e.g. Jan 2013). These are the steps that I follow:
- I want to select records from each period.
- Put the results into a CSV file.
- Then copy the headers and save the CSV file to a text file with different name.
- Then take the text file and gzip that file.
- Now find the records that are in the text file and create a counts file. (.txt)
- Now take that gzip file and counts file and create a .tar file.
- 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?