How to trap null date value?
Moderators: chulett, rschirm, roy
How to trap null date value?
In a transformer stage, I need to trap null date values. I use IsNull(input_column). It recognizes that it is no null values, but actually there is. How can I go about this, thank you very much
Re: How to trap null date value?
Can you try to trim the input field first and then check with IsNull() function as shown below -
IsNull(Left(Trim(input_column_name),Len(Trim(input_column_name))))
IsNull(Left(Trim(input_column_name),Len(Trim(input_column_name))))
i also have faced this problem before, what i did is used a If condition something like this to test for the null value, u might use a compare function or a len(trim(col_name) function. Let me know if it solved your problem or else i can provide u the exact if condition.
if len(trim(Lnk_Concat_Xfm4.Claim_Type)) = 0 then 1234567890 else if Lnk_Concat_Xfm4.Claim_Type = '\0' then 2222222222 else if Lnk_Concat_Xfm4.Claim_Type = '' then 3333333333 else if IsNull(Lnk_Concat_Xfm4.Claim_Type) Then 4444444444 else If
Len(Trim( Lnk_Concat_Xfm4.Claim_Type )) = 0 Then 555555555
Else If Compare(Lnk_Concat_Xfm4.Claim_Type,'') Then 666666666
else 'Else'
if len(trim(Lnk_Concat_Xfm4.Claim_Type)) = 0 then 1234567890 else if Lnk_Concat_Xfm4.Claim_Type = '\0' then 2222222222 else if Lnk_Concat_Xfm4.Claim_Type = '' then 3333333333 else if IsNull(Lnk_Concat_Xfm4.Claim_Type) Then 4444444444 else If
Len(Trim( Lnk_Concat_Xfm4.Claim_Type )) = 0 Then 555555555
Else If Compare(Lnk_Concat_Xfm4.Claim_Type,'') Then 666666666
else 'Else'
ArndW wrote:Perhaps I misunderstood what you would like to do. Could you explain what you want to write when the date is null? ...
Pranay
Seatte, WA
Seatte, WA