Data Conversion problem
I am running this query in the data flow task
ISNULL(Cast(D.SDAInverterId AS varchar(50)),'UNKNOWN')as SDAInverterID,ISNULL(Cast(E.sdaCLIPID AS varchar(50)),'UNKNOWN')as SDAClipID FROM CustomerService.SDA A
LEFT JOIN
(SELECT MIN(CAST(sdainverterid AS VARCHAR(50)))SDainverterid, sda
FROM customerservice.sdainverter
GROUP BY sda )D ON A.SDAID=D.SDA
LEFT JOIN
(SELECT MIN(CAST(sdaCLIPID AS VARCHAR(50)))SDaClipID, sdaID
FROM customerservice.sdaClip
GROUP BY sdaID )E ON A.SDAID=E.SDAID
And getting the following errors:
[Source [1]] Error: There was an error with output column "SDAInverterID" (38) on output "OLE DB Source Output" (11). The column status returned was: "The value could not be converted because of a potential loss of data.".
[Source [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "SDAInverterID" (38)" failed because error code 0xC0209072 occurred, and the error row disposition on "output column "SDAInverterID" (38)" specifies failure
on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source" (1) returned error code 0xC0209029. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning
of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
The problem I understood is
When I look in external columns using advanced editor it shows datatype for sdainverterid,sdaclipid as String[DT_STR]
but in the output column is gives GUID . I dont understand why it shows as String[DT_STR] as I m converting datatype in the query using cast.
arun
May 24th, 2011 9:57am
The issue is indeed due to the schema discrepancies.SSIS will not go into the nitty griities off your SQL code and look and the conversions made, just use the advanced editor of the Execute SQL Task (this is where I think the SQL is) to tweak the output.
Sometimes, what helps is a derived column transformation which makes the fine tuning of data types easier.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
May 24th, 2011 10:00am