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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-01-20 : 07:11:31
|
| mark writes "how to run sp or query from sql server into text file?SQL Server: DeveloperLogin: saPassword: testDatabase: PerInfoTable: Name_tblI need to send information into txt file "select id,last,first from name_tbl" from SQL Server.Thanks" |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-01-20 : 14:46:49
|
| You can use DTS or bcp.exe for this. You could use the Import/Export wizard as well, but that's just a subset of DTS anyway. Let us know which tool you'll be using then we can offer some help on it if you need it.Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-01-20 : 16:49:55
|
| Well at least it's not blankBrett8-) |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-01-20 : 19:53:05
|
| exec master..xp_cmdshell 'bcp "select id,last,first from PerInfo..name_tbl queryout c:\myfile.txt -Usa -Ptest -c'==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|