issue with null handling
Moderators: chulett, rschirm, roy
issue with null handling
Hi,
I have a requirement in which one of the column abc of length 20 (nullable not a key column) has to be left aligned and space padding is to be done if the column value is less than 20 (i.e, if the length is 5 then, after first five char there should be a space of 15).
Here i have used a stage variable stglen to store the length of the column
stglen=Len(trim(In_link.abc)).
and using the isnull function in the transformer
If IsNull(In_link.abc) then space(20) else (trim(DSLink67.short_nm):Space(20-stglen)).
even after doing the above i can still see null value being populated for the above column .
My source is a sybase stage.
Appreciate ur help.
Thanks,
Sheema
I have a requirement in which one of the column abc of length 20 (nullable not a key column) has to be left aligned and space padding is to be done if the column value is less than 20 (i.e, if the length is 5 then, after first five char there should be a space of 15).
Here i have used a stage variable stglen to store the length of the column
stglen=Len(trim(In_link.abc)).
and using the isnull function in the transformer
If IsNull(In_link.abc) then space(20) else (trim(DSLink67.short_nm):Space(20-stglen)).
even after doing the above i can still see null value being populated for the above column .
My source is a sybase stage.
Appreciate ur help.
Thanks,
Sheema
Yes, you can find and edit it's default value in the Administrator, then insert and include the variable as a parameter in your job(s).
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Re: issue with null handling
Am I right in saying that you are mapping a different column than the one you find the length of.Svengiyil wrote: stglen=Len(trim(In_link.abc)).
and using the isnull function in the transformer
If IsNull(In_link.abc) then space(20) else (trim(DSLink67.short_nm):Space(20-stglen)).
even after doing the above i can still see null value being populated for the above column .