Hi all,
if i use isnull function in ETL on a numeric field?it will hit the error?Urgent one. Please help!!!
how to use isnull
Moderators: chulett, rschirm, roy
Hi,
It might help to state the expression you use and the exact error you get so we might give a more helpfull reply.
It might help to state the expression you use and the exact error you get so we might give a more helpfull reply.
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The IsNull() function can take any data type as its argument, and returns 1 (= true) if the argument is null, or 0 (= false) if the argument is not null.
The only time you can get an error - which is actually a warning - is if you try to use an unassigned variable as the argument. This can happen because of a spelling or casing error. In the following example the two variable names (Amount and amount) are different.
In this case you get a warning about an unassigned variable, referring to the "amount" variable.
The only time you can get an error - which is actually a warning - is if you try to use an unassigned variable as the argument. This can happen because of a spelling or casing error. In the following example the two variable names (Amount and amount) are different.
Code: Select all
FUNCTION AddTax(Amount, TaxRate)
If IsNull(amount)
Then
Ans = @NULL
End
Else
Ans = Amount * (1 + TaxRate / 100)
End
RETURN(Ans)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.