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
 General SQL Server Forums
 New to SQL Server Programming
 Export Query Results

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2010-09-28 : 16:18:11
Hi -

I am using sql 2005 and would like to export the results of a query. Can you please help me?

X002548
Not Just a Number

15586 Posts

Posted - 2010-09-28 : 16:31:06
do you know what bcp is?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx





Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-09-29 : 06:35:46
If not, have a look at it in SQL Server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rbedick1
Starting Member

1 Post

Posted - 2012-04-22 : 15:32:04
You could use QueryToDoc ([url]http://www.querytodoc.com[/url]). It lets you write a query against a SQL database and export the results - after you pick the delimiter - to Excel, Word, HTML, or CSV. A command line version lets you schedule queries, write results to an Excel, Word, HTML or CSV file and then send that file as an email attachment to a list of selected recipients.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-04-22 : 21:33:07
whats issue with using already available bcp utility?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

vinu.vijayan
Posting Yak Master

227 Posts

Posted - 2012-04-23 : 08:23:52
You can export the query results using DTS Wizard as well.

N 28° 33' 11.93148"
E 77° 14' 33.66384"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-04-23 : 11:30:48
quote:
Originally posted by vinu.vijayan

You can export the query results using DTS Wizard as well.

N 28° 33' 11.93148"
E 77° 14' 33.66384"


I hope you meant SSIS export import wizard in 2005

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2012-04-24 : 01:42:00
Another option is SQLCMD with the -o switch (output file)

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -