IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Need Oracle "isBlank" boolean test
I need a simple way to test to see if a field is all blanks. Something like Length(trim(x)) = 0 does not work. There are other goofy tricks to find it, but why is it so much ugly code? It should be simple. Am I missing a magic function? F Oracle for having null strings anyhow. Nulls have use for numbers, but not characters. Dumb. I hope Ellison's boat sinks. Arrrrrg!
________________
oop.ismad.com
New Blank Strings are null?
At least I think that's the way that Oracle handles them. So you might be able to test IS NULL.
New Depends on what he means by a "blank string"
My solution said that nulls are not blanks. If you are willing to accept them, then just:

TRIM(x) IS NULL

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New Empty strings is what I meant. :-)
Thanks.
New TRIM(NVL(x, 'NULL')) IS NULL
Yes, it is wordy and ugly. But you come to expect that of SQL.

And contrary to your assertion, nulls have a definite meaning and use in string data. I just wish that databases understood that empty strings also have their place. (In which case what you tried would have worked.)

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New Why the NVL?
Just futzing around on Oracle 9i, and the following seems sufficient:

   TRIM(x) IS NULL
New What I thought that he wanted...
was a test for when a string was just a row of spaces.

In which case you DON'T want NULL to match, so we need to move NULLs to some string that won't be nulled by the TRIM.

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New understood. thanks.
     Need Oracle "isBlank" boolean test - (tablizer) - (7)
         Blank Strings are null? - (ChrisR) - (2)
             Depends on what he means by a "blank string" - (ben_tilly) - (1)
                 Empty strings is what I meant. :-) - (ChrisR)
         TRIM(NVL(x, 'NULL')) IS NULL - (ben_tilly) - (3)
             Why the NVL? - (ChrisR) - (2)
                 What I thought that he wanted... - (ben_tilly) - (1)
                     understood. thanks. -NT - (ChrisR)

An implementation of non-trivial covariant returns for non-varadic virtual functions.
42 ms