Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

MSVisual Studio - DTSX Package creating new text file

MSVisual Studio - DTSX Package creating new text file

MSVisual Studio - DTSX Package creating new text file


I have a Visual Studio 2005 dtsx package that I created and then imported to SQL Server Agent as a job that is scheduled to run daily. The package basically executes sveral stored procedures (in SQL server mgmt studio) that populate a CUSTOMER table and a TRANSACTIONS table. Then it selects everything from both tables, and puts the contents into two txt files (Cust.txt , Trans.txt).
Right now, there are only 2 txt files that I listed as Connections and everytime the job runs, it just overwrites everything that is in each txt file.

I've only ever created pretty simple jobs, so I'm stuck on the next step that I need to create:

Instead of having only 2 txt files, I need the package to create a 2 new ones (one for CUSTOMER and one for TRANSACTIONS) each day and name those files with the date that's in the data  - it's not the current date though. The data is going 7 days back (DATEADD(day, -7, GetDate())) so the new file name should be: Cust6-16-11.txt

I'm not sure how to create new txt files without having them already out there to establish them as connections in the Connetion Manager...? I'm guessing this might require some sort of scipt?  

Thanks in advance for any help.  


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close