[thelist] Testing for the various NULL's (Result!)
Rob Smith
rob.smith at THERMON.com
Fri Dec 6 14:51:01 CST 2002
Hi List,
After fighting with my computer a bit and maintaining a few bruises, I have
the solution! or a working one at least... (there should be a bright gold
heavenly aura around this code with angels singing in the background:
"Ahhhhhhh")
if Left(commercial_region,1) <> " " then
if not commercial_region = "" then
response.write(commercial_region)
end if
end if
What's even more weird is that these tests failed when on the same line
separated by an OR. They where however, successful as you see them here, on
different lines.
The left was to test for left over residue from existing data that was just
deleted, not NULL'ed. The not = "" successfully tested for the actual
"<Null>" value we're so familiar with in SQL Server.
These are the tests I've tried (once again):
if not something = "" then worked
if Left(something,1) <> " " worked
if something <> "" then didn't work
if IsNull(something) then didn't work
if not IsNull(something) then didn't work
if not something = NULL then didn't work
if not something is NULL then didn't work
if something = NULL then didn't work
if something is NULL then didn't work
>don'tcha just love nulls? ...
rudy
[Rob glares with daggers in his eyes at the question]
...There's the/a solution now I'm going back to work
Rob.Smith
More information about the thelist
mailing list