Page 1 of 1

Null Handling

Posted: Tue Nov 15, 2005 12:24 am
by srivvds
Hi,

While I am trying to convert datatypes for few columns like Varchar to Decimal, Varchar to Date and Varchar to Timestamp which are not nullable on the target table, I am getting following warnings:

1) APT_CombinedOperatorController,2: Numeric string expected, got "". Use Decimal default value.

2) APT_CombinedOperatorController,2: Null string argument.

Please let me know best way to get over these warnings.

Thank You,
RSSV

Re: Null Handling

Posted: Tue Nov 15, 2005 1:10 am
by pavankvk
srivvds wrote:Hi,

While I am trying to convert datatypes for few columns like Varchar to Decimal, Varchar to Date and Varchar to Timestamp which are not nullable on the target table, I am getting following warnings:

1) APT_CombinedOperatorController,2: Numeric string expected, got "". Use Decimal default value.

2) APT_CombinedOperatorController,2: Null string argument.

Please let me know best way to get over these warnings.

Thank You,
RSSV
check the null value using IsNull function and assign a default value if it returns 1

Posted: Tue Nov 15, 2005 1:55 am
by vmcburney
Looks like you are in a Transform stage, wrap a NullToValue around your string fields to turn them into zeros or reject them out of the transformer. If you were using a Modify you would do something like decimal_from_string(handle_null(stringfield, 0)).

Posted: Thu Nov 17, 2005 2:55 am
by srivvds
Hi,

In my case there is no default value like 0 or anything. If source field is null or empty or invalid value, after converting Datatype I should get null in target oci stage.

Can anyone please suggest detail solution for this problem.

Thank You,
RSSV