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
 output file

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-16 : 09:42:19
venkatesh writes "Hi all,

I have a simple sql Query, when I execute the query the result should also be written to a text file. Can I do that in SQL 2000?

Thanks
-Venky"

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-16 : 09:42:57
From where are you executing query?

If it's QA, then you can set Tools, Options, Results, Results to File option and execute query to save output to file.

Otherwise, you can use OSQL utility.

Read about it more in BOL.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-11-16 : 09:50:40
Use bcp with QUERYOUT



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

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-16 : 11:40:24
http://weblogs.sqlteam.com/mladenp/archive/2006/07/25/10771.aspx



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -