Hi Friends,
I have one field which is Varchar datatype in source and I need to check if it is not null and if it not an integer I have to set it to null else populate the same and write error msg.But my output column is an Integer and I have used If IsNotNull(input.field) and Num(input.field) in stage variable(sv) and
in output column :If sv then input.field else 0.
and I also tried in other way round,eventhough I am getting the warning like this.
APT_CombinedOperatorController(4),3: Null string argument.
I am not using basic trnasfomer.
Can anyone help me how to check for an Integer of varchar datatype and numeric.
Thanks in Advance
Anju
Check for an Integer and null
Moderators: chulett, rschirm, roy
What exact derivations have you used, please copy & paste them since the data in your post isn't complete.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 99
- Joined: Mon Sep 03, 2007 7:49 am
- Location: Stockholm, Sweden
Remember that a stage varible cant contain NULLs so a tip is to first convert any null to something else and use that stage varible in you derivation later.
Usually that warning indicates that you are evalulating a column which has null and that operation does not allow NULLs
Usually that warning indicates that you are evalulating a column which has null and that operation does not allow NULLs
-------------------------------------
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
Thanks for your response.
I have tried in ouput column derivation :
If NOT(ISNULL(input.field)) Then Num(input.field Else NullToZero(input.field).
I got the same warning and again I tried with
If NOT(ISNULL(input.field)) Then StringTodecimal(input.field,"round_inf") Else NullToZero(input.field)
So I got conversion from string to deciaml warning.
Can anyone suggest me on this.
Anju
I have tried in ouput column derivation :
If NOT(ISNULL(input.field)) Then Num(input.field Else NullToZero(input.field).
I got the same warning and again I tried with
If NOT(ISNULL(input.field)) Then StringTodecimal(input.field,"round_inf") Else NullToZero(input.field)
So I got conversion from string to deciaml warning.
Can anyone suggest me on this.
Anju