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

How to turn xml numbers-or-NA in to database numbers-or-NULL ?

$
0
0

Hi all,

I'm reading xml files into a database table. There's a column in the xml representing prices. When there is no price, the value given is "NA".

So I'm reading the values into ssis as xs:string, and then have a data conversion step them numeric for db insertion.

This causes a problem on the NA values - the conversion fails with message:

[Convert datatypes for attunity [34]] Error: Data conversion failed while converting column "PRICE" (358) to column "a_PRICE" (86).  The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

How do I set it up so that ssis performs the following logic: Numbers stay what they are, and anything else turns into null.

Thanks for any tips,

sff


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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