Page 1 of 1

Type Conversion Error........

Posted: Mon Apr 07, 2008 2:57 pm
by pavans
Hi

I am getting a following error.

Un-handled conversion error on field "FOB_TYPE_C " from source type "string[40]" to destination type "decimal[10,0]":
source value="WS "; the result is non-nullable and there is no handle_null to specify a default value.

The datatype for FOB_TYPE_C is Char(40) in source table (oracle).
In Target it goes to PO_TYPE_C Number (10).

I tried using StringToDecimal(Trim(FOB_TYPE_C)) but didnt work.
Let me know your inputs.

Thanks

Posted: Mon Apr 07, 2008 3:02 pm
by chulett
Curious... how do you propose to convert string values like your "WS" into a decimal?

Posted: Mon Apr 07, 2008 3:14 pm
by pavans
chulett wrote:Curious... how do you propose to convert string values like your "WS" into a decimal? ...
---------------------------
Even i was surprised to see that.
Som else has done the coding and job aborted due to this and i was looking into it for the first time. I didnt realize this.

----------------------------------------------------------


Do we have a way to handle this.
Let me know your inputs.

Re: Type Conversion Error........

Posted: Mon Apr 07, 2008 3:17 pm
by chulett
As noted in your error message:
pavans wrote:the result is non-nullable and there is no handle_null to specify a default value.

Re: Type Conversion Error........

Posted: Mon Apr 07, 2008 3:24 pm
by pavans
chulett wrote:As noted in your error message:
pavans wrote:the result is non-nullable and there is no handle_null to specify a default value.
You mean:

StringToDecimal(FOB_TYPE_C);
i tried but it didnt work.
Am i missing anything here.

Posted: Mon Apr 07, 2008 3:33 pm
by ray.wurlod
Yes, you are missing a specification of what to do when the data include a NULL.

Posted: Mon Apr 07, 2008 6:13 pm
by John Smith
You have a data quality issue here, the source data contains row(s) with the value "WS " which you are attempting to convert to a decimal. either you provide rules to deal with this e.g what is the equivalent of WS in decimal ? or you filter out these records.