0

How do I go about exporting SQL Server 2005 tables to a fixed length field text file, with one record per line? SQL seems to think fixed length is the only way to delimit records, i.e. fieldLen1 + fieldLen2 + ... + fieldLenN = recLen. I can't find any way of delimiting each record with a newline.

Also, when I tried the wizard from a normal DB engine connection, it puked on a column name called "ShortLocation". I fail to see what could be difficult about writing that out to a text file, but I gave up on the wizard and am trying a SSIS package, but as soon as I make the format "Fixed Width" I lose the row delimiter option.

Surely my requirement is not that unheard of?

Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151
ProfK
  • 493
  • 5
  • 9
  • 28

1 Answers1

2

Try the 'ragged right' option mentioned here :

http://weblogs.asp.net/guystarbuck/archive/2008/01/31/ssis-flat-file-export-quot-fixed-width-quot-vs-quot-ragged-right-quot.aspx

MartW
  • 1,305
  • 10
  • 15