Well this seems to be a limitation. you can run following command and export data from any table into txt file.
bcp “SELECT * FROM DBname.dbo.tablename” queryout filepath -T -c \t
But when it comes to display the header row in the txt file then bcp seems to have limitation. You can use following command
to do this task easily.
sqlcmd -A -d DBname -o filepath
So easy right….
INTERVIEW PREPARATION IN 30 MINs – Read Following wires for a quick interview preparation.
- SQL Server DBA “Interview Questions And Answers”
- SQL Azure Interview Questions and Answers Part – 1
- SQL Azure Interview Questions and Answers Part – 2
- Powershell Interview Questions and Answers
Online MSSQL Classes @ http://tuitionaffordable.webstarts.com