Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Need help with Derived Column Transformation - string to numeric

$
0
0

Hi,

My flat file source has a column defined as string and I need to convert it to a number (13,2).

The first 177 rows has spaces for this field ("                ", then numbers will appear starting with row 178. I tried to create a new column using the following:

TRIM(SPNDWN_AMT) == "0 " ? NULL(DT_NUMERIC,13,2) : (DT_NUMERIC,13,2)(TRIM(SPNDWN_AMT))

This errors out with:[Convert SpendDown Amt to Numeric [782]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "component "Convert SpendDown Amt to Numeric" (782)" failed because error code 0xC0049063 occurred, and the error row disposition on "output column "SPNDWN_AMT_REV" (793)" 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.

What am I doing wrong?

Thanks for your help.

Dave


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>