Page 1 of 1

NullToValue function

Posted: Thu May 13, 2004 9:08 am
by KeithM
In the past I have used the NullToEmpty function with success. Now I am trying to use the NullToValue fuction and I cannot get it to work. I can get around the problem by using an "If Isnull" statement but I am wondering what I am doing wrong. Can someone give me an example of how to use this function or does it not work?

Thanks

Posted: Thu May 13, 2004 9:28 am
by kcbland
What's the error message?

Posted: Thu May 13, 2004 9:48 am
by KeithM
This is how I am calling the function:
NullToValue(lnkLkpCountry.Country_Key, 1)

The error message is:
Array 'NullToValue' never dimensioned.

Posted: Thu May 13, 2004 10:15 am
by kcbland
Where/how are you using this function? Either it's not compiled or you are using inside another function without a DEFFUN statement.

Posted: Thu May 13, 2004 11:53 am
by KeithM
Thanks, this helped me find out what my problem was. I was trying to use the function in a transformer stage. There was no transform function defined for NullToValue but there was one for NullToEmpty. I created one for NullToValue and now it works.