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 |
fralo
Posting Yak Master
161 Posts |
Posted - 2011-01-04 : 15:53:13
|
I need to output a file from one server to another. How might I do this with BCP?Here's something which generates it locally.select @sqloutput = 'bcp test.dbo.test_con out c:\bcp\concentra.txt -c -t "|" -T' Thanks for your help. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
fralo
Posting Yak Master
161 Posts |
Posted - 2011-01-04 : 16:13:08
|
Thanks Tara, but I'm completely new to this. Would it look something like this?select @sqloutput = 'bcp test.dbo.test_con out \\servername\\c$\ftp\concentra.txt -c -t "|" -T'Thanks. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
fralo
Posting Yak Master
161 Posts |
Posted - 2011-01-04 : 16:33:49
|
My path actually contains the 'Program Files' although I didn't post it. It's not working perhaps because it contains blank spaces?select @sqloutput = 'bcp test.dbo.test_con out \\servername\c$\Program Files\ftp\concentra.txt -c -t "|" -T -S'Would I need to set a variable and then have something like this?select @sqloutput = 'bcp test.dbo.test_con out @unc\concentra.txt -c -t "|" -T -S' |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
fralo
Posting Yak Master
161 Posts |
Posted - 2011-01-04 : 17:19:33
|
I thought double quotes but it doesn't.select @sqloutput = 'bcp test.dbo.test_con out "\\servername\c$\Program Files\ftp\concentra.txt" -c -t "|" -T -S' |
 |
|
|
|
|