Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Alternatives to sp_makewebtask

Author  Topic 

emroc
Starting Member

2 Posts

Posted - 2008-09-30 : 13:08:52
Hi all,

I posted this question in the 'Export to Excel' thread in the Script Library forum, but I figured I would post here as well.

I have been wrestling with my export to Excel problem for a couple of weeks now, and just when I think I've found the perfect solution (sp_makewebtask), I find out it's being deprecated in future versions of SQL Server!

I am developing a SSIS job on my server that runs dynamically generated queries that it pulls from a table in my database, and stores the results of the query to a table. I am at the point now where I would like to add a step in my SSIS package to export the full table to an Excel file, but I am not sure the best way to go about this.

Obviously, any solution that requires that the file already exists (e.g. openrowset) would not be suitable for my purposes. sp_makewebtask works perfectly for me, but I require a solution that can be carried over to SQL Server 2008 when needed.

I am sure I am able to use BCP to get this done, but it would require some workaround coding to ensure that the table's column headers are output as well.

Can anyone advise the best solution for this situation?


Any advice is much appreciated.

dmdstech
Starting Member

1 Post

Posted - 2009-05-20 : 12:08:17
Has there been any suggestions for this problem yet?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-05-20 : 12:17:12
You can use the osql or sqlcmd utilities to output data with column headings. They're documented in Books Online. You can also use xp_sendmail or sp_send_dbmail to send formatted results with or without column headers, if the end result is to be emailed anyway.
Go to Top of Page
   

- Advertisement -