Export to FTP site in .xls format on a schedule (ie every week on Tuesday) from SQL

Posted on 2008-11-07
Last Modified: 2013-12-02
We use SQL 2005.  I have a query written in SQL that I would like to set up as a job that pulls the data into an excel file and "drops it off" on an external FTP site.  Ideally the file name would change dynamically by including the file-drop off date (getdate()) before the extension when it gets placed on the FTP site itself (ie data110608.xls)

I've looked into SSIS packages and the FTP connector, but can't connect the dots.  Can anyone point me in the right direction?
Question by:angelnjj
    1 Comment
    LVL 17

    Accepted Solution

    SSIS is a good choice based on your requriements.
    1. It can be scheduled as a job. 2. Easily export data from SQL to Excel. 3. Dynamic filenames for your Excel easily managed by expressions and delivered date functions. 4. Sending a file via FTP is super easy using either a command line job or executable.
    I have written quite a few examples on all of the above here at EE as have many other experts. Please search here for specific help but ask if you need something.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now