Hello All,
I am facing problem while using ISNOTNULL(string) and LEN(TRIM(string))>0.
It would be great if someone can please let me know what is the exact difference between them and when should I use what?
Thanks,
Bireswar
Difference between ISNOTNULL(string) and LEN(TRIM(string))&g
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 33
- Joined: Wed Sep 03, 2008 5:48 am
- Location: Bangalore
Difference between ISNOTNULL(string) and LEN(TRIM(string))&g
Thanks,
Bireswar
Bireswar
Bireswar,
there are a lot of DSXChangers who would help you, but only if you define "facing a problem". There is a very big and very fundamental difference between a NULL string and an empty string; once you get a grasp of that the question will most likely answer itself.
A NULL string is a string which contains an undefined value. An empty string is just a string which has a length of 0 and contains nothing. "Nothing" and "Undefined" are different. Also, a NULL string is undefined and therefore has no length (which is also different from 0 length)
there are a lot of DSXChangers who would help you, but only if you define "facing a problem". There is a very big and very fundamental difference between a NULL string and an empty string; once you get a grasp of that the question will most likely answer itself.
A NULL string is a string which contains an undefined value. An empty string is just a string which has a length of 0 and contains nothing. "Nothing" and "Undefined" are different. Also, a NULL string is undefined and therefore has no length (which is also different from 0 length)
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I suggest this code:
Code: Select all
If IsNotNull(string)
Then if Len(Trim(string)) > 0
Then <do something>
Else <do something>
Thanks and Regards!!
dspxlearn
dspxlearn
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: