Null checking for decimal

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
kamalshil
Participant
Posts: 179
Joined: Mon Jun 23, 2008 1:19 am

Null checking for decimal

Post by kamalshil »

Hi All,

In my job i have an column A which is decimal 38,0 and nullable yes.

But when i am trying to add the null handling statement before loading it to database table.

Code: Select all

If IsNull(Column A) Then SetNull() Else Column A
i am getting an fatal error operator failed.
And if i don't do null handling the record is getting dropped.
And for this i have two transformer.
1st transformer is passing value. 2nd one is dropping it.

And for all other columns it is working fine only when i add the logic for this column i am facing the problem.


Can some one suggest what problem may be.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Re: Null checking for decimal

Post by zulfi123786 »

[If IsNull(Column A) Then SetNull() Else Column A

What are you trying to do here as a straight move would be sufficient as there is no arithmetic expression or function where Column A is being used.

Check if you have specified column A as Nullable YES in the metadata and if this is a database stage check it the table id structured to have Nulls in this column
kamalshil
Participant
Posts: 179
Joined: Mon Jun 23, 2008 1:19 am

Re: Null checking for decimal

Post by kamalshil »

zulfi123786 wrote:[If IsNull(Column A) Then SetNull() Else Column A

What are you trying to do here as a straight move would be sufficient as there is no arithmetic expression or function where Column A is being used.

Check if you have specified column A as Nullable YES in the metadata and if this is a database stage check it the table id structured to have Nulls in this column
Yes column a is Nullable YES and in input it is having null values thats why the column is getting droped.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Perhaps it is "nullable no" on output, that would explain the behaviour
Post Reply