I'm using SSIS 2008 to extract data from SQL Server, grab fields from other databases along the way, do a derived column to convert strings and a data conversion transform before storing the output to a text file.
Somehow along the way, the EncounterNumber field is being duplicated. The output columns metadata from the data conversion transform to the flat file destination shows this field twice. The error I'm getting when trying to map fields into the flat is as follows:
Error at Data Flow Task [Flat File Destination [44524]]: There is more than one data
source column with the name "Encounter Number". The data source column names must be
unique.
(Microsoft Visual Studio)
===================================
Exception from HRESULT: 0xC0207015 (Microsoft.SqlServer.DTSPipelineWrap)
------------------------------
Program Location:
at
Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass.
ReinitializeMetaData()
at
Microsoft.DataTransformationServices.DataFlowUI.
DataFlowComponentUI.ReinitializeMetadata()
at
Microsoft.DataTransformationServices.DataFlowUI.FlatFileDestinationUI.conn
Page_SaveConnectionAttributes(Object sender, FlatFileConnectionAttributesEventArgs
args)
Is there an error output or some other way of handling the duplicate Encounter field so that the fields can be mapped into my flat file destination?
Update: Here's a screen shot of the data flow:
The metadata from the data conversion is as follows:
"Name" "Data Type" "Precision" "Scale" "Length" "Code Page"
"Encounter Number" "DT_STR" "0" "0" "20" "1252" "0" ""
"OLE DB Source"
"Encounter Number" "DT_WSTR" "0" "0" "20" "0" "0" ""
"Data Conversion"
How do I remove the Data Conversion or OLE DB Source version of the Encounter Number? Is this a setting somewhere?