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
 Transact-SQL (2005)
 Query Result to text file

Author  Topic 

kwikwisi
Constraint Violating Yak Guru

283 Posts

Posted - 2009-01-10 : 02:21:27
hello

How can I save sql query result to .txt file ?

thanks in advance.

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-01-10 : 02:27:11
go to query---> results to -----> select results to file
then u save ur file in ur location with .txt file
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-10 : 02:30:23
or use bcp with query out option if you want to automate it

http://sqlblogcasts.com/blogs/madhivanan/archive/2007/08/27/bcp-export-data-to-text-file.aspx
Go to Top of Page
   

- Advertisement -