How to: Convert Data to a Different Data Type by Using the Data Conversion Transformation
To add and configure a Data Conversion transformation, the package must already include at least one Data Flow task and one source.
To convert data to a different data type
In Business Intelligence Development Studio, open the Integration Services project that contains the package you want.
In Solution Explorer, double-click the package to open it.
Click the Data Flow tab, and then, from the Toolbox, drag the Data Conversion transformation to the design surface.
Connect the Data Conversion transformation to the data flow by dragging a connector—the green or red arrow—from the source or the previous transformation to the Data Conversion transformation.
Double-click the Data Conversion transformation.
In the Data ConversionTransformation Editor dialog box, in the Available Input Columns table, select the check box next to the columns whose data type you want to convert.
You can apply multiple data conversions to an input column.
Optionally, modify the default values in the Output Alias column.
In the Data Type list, select the new data type for the column. The default data type is the data type of the input column.
Optionally, depending on the selected data type, update the values in the Length, the Precision, the Scale, and the Code Page columns.
To configure the error output, click Configure Error Output. For more information, see How to: Configure an Error Output in a Data Flow Component.
To save the updated package, click Save Selected Items on the File menu.