Hi frnds !
i want to know wethere !
1) Trim(input," ","B") gives the result empty i.e "",
whether this "" equals to @Null..
so if it is Same can we specify Trim(input," ","B") = @Null
so, ""=@null specify yes or no
Regarding NULL
Moderators: chulett, rschirm, roy
Regarding NULL
In Adv Thanks
---------s
---------s
sekr,
why haven't you tested this yourself? You can go into the Manager and create your own DataStage routine and test it with your question all within a minute...
The answer is that the output from TRIM() on any string that is not null will also be not null. In your example it will be the empty string "", of length 0. This same approach applies to all DataStage builtin functions - you won't get a NULL as an answer unless one of your inputs was also a NULL value.
why haven't you tested this yourself? You can go into the Manager and create your own DataStage routine and test it with your question all within a minute...
The answer is that the output from TRIM() on any string that is not null will also be not null. In your example it will be the empty string "", of length 0. This same approach applies to all DataStage builtin functions - you won't get a NULL as an answer unless one of your inputs was also a NULL value.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
1. Trim() never results in a zero-length string.
2. A zero length string ("") has a known value. Null is unknown. You can never claim that they are equal (or even unequal).
2. A zero length string ("") has a known value. Null is unknown. You can never claim that they are equal (or even unequal).
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.
Never? I was under the impression that if I trim a string with all spaces I would end up with a zero-length string. And testing seems to hold that out, unless something else is going on:ray.wurlod wrote:Trim() never results in a zero-length string.
Code: Select all
Len(Trim(" "))
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers