scripted job - run select and send results in XLS format via email

  • I have a SELECT statement that I need to run on a weekly basis. I need the results to be put in CSV/XLS format and to be emailed automatically. Is there anyway to do this via a job?

    Any help on this would be greatly appreciated.

    Thanks,

    Damon Jongbloed

    Jennie-O Turkey Store, Inc.

  • Your best bet would be to create a DTS package, with your specified query, outputting to an excel file.

    If the person receiving the data is an internal person, you could create a share on their PC to write the file to on a regular basis, if you schedule the DTS Package to run as a job.

    For emailing the file, I'm not 100% sure, but will take a look and get back to you.

  • I don't know if Reporting Services exists for SQL 2000, but if you can get to SQL 2005, it exists there, and it provides a subscription capability one can add to any given report, that would be ideal for your situation. You can even set up a "data driven" subscription, such that a query can be used to generate the list of subscribers, and data from that query can also be used as a parameter input to the query that's the basis for the report itself, such that each user get's a customized report based on their information from the subscription list query.

    Steve

    (aka smunson)

    :):):)

  • Ah yeah, Reporting Services is the easiest solution and is available for SQL Server 2000.

    Visual Studio to define the Report, and Report Manager to configure a subscription to any email addresses you want...

    Even if you;ve never used Reporting Services before, it's quite easy to pick up and you could have it set up within a day.

Viewing 4 posts - 1 through 3 (of 3 total)

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