Solved

Outputting a file using MSSS 2008 R2

Posted on 2014-02-04
1
315 Views
Last Modified: 2014-02-07
I'm currently using bcp to putput a csv file each day and want to know if there is a much better way to do this.   I'm using MS SQL Server Management Studio 2008 R2.

THanks .......

Joel
0
Comment
Question by:jtbrown1111
1 Comment
 
LVL 40

Accepted Solution

by:
lcohan earned 500 total points
ID: 39833544
You can use SSIS to do that easily
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/41293231-1d96-4315-8884-d3a89abc2f66/how-do-i-export-to-csv-in-ssis?forum=sqlintegrationservices


or direct from SQL Query like below:

exec master..xp_cmdshell N'sqlcmd -E -Q"set nocount on; select * from DB_Name.dbo.TableName;" -s"," -W -o"c:\output.csv"'
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

756 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