I'm using the BCP OUT command to extract the contents of a SQL table to a
text file. When doing this is there an parameter to format the data into a
fixed format?
Script being used:
bcp.exe databasename.dbo.table OUT datafile -t
"," -c -CRAW -Sservername -Uuser -Ppassword
ThanksBrent Stevenson (essexbs@.insightbb.com) writes:
> I'm using the BCP OUT command to extract the contents of a SQL table to a
> text file. When doing this is there an parameter to format the data into a
> fixed format?
> Script being used:
> bcp.exe databasename.dbo.table OUT datafile -t
> "," -c -CRAW -Sservername -Uuser -Ppassword
Do you mean a format where each column has a fixed length? You would need to
use a format file for that.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspxsql
没有评论:
发表评论