converting datatype varchar to numeric
If I add a task to run before each document, will it slow down the process?
I would recommend using a calculated column in your destination to check first if the field contains numbers, and if not to then insert a 0, or whatever default value you want. Below is a brief sample of the script you would need to run. Replacing “_Amounts” with whatever field you want to evaluate.
if _AMOUNTS.ToString() = string.empty or not IsNumeric(_AMOUNTS) then
thanks for the script, I’m sure it would work, but the following worked in my case:
I’m having the same issue working with an Excel source file, but neither scrip is working for me.
On the first one when trying to validate the script I’m getting the message ‘IsNumeric is not declared’.
The second script will validate but when the map runs it’s coming back with the error about converting varchar to numeric.
Any further suggestions?
If you would like to submit an answer or comment, please sign in to the eOne portal.