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 |
|
Trent
Starting Member
39 Posts |
Posted - 2004-10-21 : 11:48:38
|
| Is there any tSQL code that sends its output to say a fileshare on a server? |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-10-21 : 12:07:37
|
| DO you want to run some SQL that runs on the SQL box, and the output from that is stored to a file that the SQL box has access to?Or some other problem?Kristen |
 |
|
|
Trent
Starting Member
39 Posts |
Posted - 2004-10-21 : 13:22:33
|
| Yes, that's what I'd like to do. |
 |
|
|
Kristen
Test
22859 Posts |
|
|
Trent
Starting Member
39 Posts |
Posted - 2004-10-21 : 13:58:54
|
| So if I had something like this:SELECT TesterID, LastName, FirstName....How would I send those to some destination? |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-10-21 : 14:22:25
|
| With a cursor <Spit!> so that you could ECHO each result to a [append to a] file using xp_cmdshell.Better would be to put them in some sort of temporary table and then use xp_cmdshell to run BCP to export that table to a file.But its jolly hard work for very little gain - are you sure you need to do it this way about? What's the problem you need to solve?Kristen |
 |
|
|
Kristen
Test
22859 Posts |
|
|
Trent
Starting Member
39 Posts |
Posted - 2004-10-22 : 11:45:53
|
| Thank you!!!! |
 |
|
|
|
|
|