Export to Fixed width text file
I am trying to export a table to a fixed lenght text file, there is only flat file option and that does not put LF/CR at the end of row, is there any solution?
I believe you can use bcp tobulk export with a format file to meet your needs. SeeFormat Files for Importing or Exporting Data for a place to start.|||if you use SQL 2005 export wizard or custom SSIS package try to select Ragged right format for flat file destination:
FormatIndicate whether to use delimited, fixed width, or ragged right formatting.
Delimited
Columns are separated by a delimiter, specified on theColumns page.
Fixed width
Columns have a fixed width.
Ragged right
Ragged right files are those in which every column has a fixed width, except for the last column, which is delimited by the row delimiter.
No comments:
Post a Comment