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 |
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2011-05-04 : 08:11:12
|
Hi,how to export table data to text file using bcp method or openrowset function. |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-05-04 : 08:16:10
|
bcp mydb..mytbl out "c:\myfile.txt" -SServername -c -Texec master..xp_cmdshell 'bcp mydb..mytbl out "c:\myfile.txt" -SServername -c -T'==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2011-05-05 : 00:49:15
|
data is not loading just its creating empty file..THis what i am usingEXEC master.dbo.xp_CmdShell 'BCP "SELECT data FROM fts.dbo.fts_test out" QUERYOUT C:\TEMP.txt -T -f -S XXX\MSSQL' |
 |
|
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2011-05-05 : 01:36:30
|
thnaks i got it is mentiond -C then it start coping |
 |
|
|
|
|