Solved

Outputting a file using MSSS 2008 R2

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

759 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

19 Experts available now in Live!

Get 1:1 Help Now