How to create text file and push them into ftp site.

  • Hello,

    I have the following requirement.

    We have about 2000 customers and they place order every week. When they place order, it is stored in orderheader table in SQL 2005.

    My task is to pull the fields: CustomerNumber, OrderNumber, and OrderDate for each customer from the orderheader table, create a text file for each customer, and push those files into corporate ftp site.

    Can I do that in a ssis package?

    Can you help me to create a script task and other logic?

    Thanks

  • Yes, that can be done in SSIS. It doesn't need a script task.

    You would use a Data Transformation task to output all of the text files. You'd need to nest that into a loop that goes through a query of all the customers that you want to output, so you can output one per customer.

    Then you'd have an FTP task that will transfer the data.

    You're probably going to be better off hiring a contractor to set it up for you, if you aren't familiar with SSIS, unless you have time to learn SSIS while you build it. Otherwise, you're liable to end up taking a long time to build it. Basic SSIS is easy once you're familiar with it, but it can take a while to get familiar with it. And since it's not just scripts and such, it's not so easy to advise you as it is with T-SQL tasks.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thanks

  • This is a duplicate post. The question is being answered here.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Do you need to create text file from sql and push them to FTP ?

  • Sorry, I did not notice of the fist comment. This can be easily done in using SQL.Do you need a code snippet ?

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply