Fixed Width Flat File Destination
Currently we're working on an SSIS package to extract data from a SQL Server database to several fixed width flat files.Some of the data needs to be formatted/converted in a certain way
- DateTimes need to be formatted in ISO8601
- Booleans need to be 0/1 instead of False/True
- ...
Has anybody any idea what the preferred approach (best practice) would be to do these conversions?
- Convert everything in the select query? What about readability of your query?
- Do it somewhere in the package? If so, how?
....
[1010 byte] By [
Mr_D] at [2007-12-21]
There are always several choices for performing conversions in your data flow.
You can certainly perform many of them in the source query. This has some advantages: if you are familiar with SQL it is easy to do, and it utilizes the SQL engine for the conversion, rather than passing "raw" data for conversion in the client (SSIS in this case.)
You can also perform conversions using the Data Conversion component http://msdn2.microsoft.com/en-us/library/ms141706.aspx and the Derived Column component http://msdn2.microsoft.com/en-us/library/ms141069(SQL.90).aspx.
Finally, the script component provides a great deal of flexibility for formatting values using Visual Basic.Net.
Donald
When using Books Online please remember that you can add comments (and vote) using the controls at the foot of the Books Online page - this will help us to improve the documentation for future use.