Solved

Outputting a file using MSSS 2008 R2

Posted on 2014-02-04
1
314 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 39

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.

839 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