June 15, 2005 at 2:46 pm
Yes
June 15, 2005 at 2:54 pm
nice... : )
Vasc
June 15, 2005 at 3:10 pm
Guess I should really classify that "yes", the product table and the c_funds table each have their own unique id that takes no NULLS.. The two id's FUNDID and ActualID do allow nulls
June 15, 2005 at 7:38 pm
This statement will never return 1 because of the NULL in the comparison.
Select 1
Where 'x' Not IN ('a', null, 'b')
This will always print 'what happened'
if 'x' NOT IN ('a', null, 'b')
print 'not in'
Else
print 'what happened'
If you compare NOT IN to null the answer is always false.
if 'x' NOT IN ('a', null, 'b')
expands to:
if 'x' <> 'a' AND 'x' <> null AND 'x' <> 'b'
The 'x' <> null is false so the entire expression is false.
June 15, 2005 at 11:59 pm
Cuz IN is out?
Not the 1st IN strangeness that I have seen, once deleted all rows in a table when the IN clause returned a NULL value! TGIH for backups...
Andy
June 16, 2005 at 7:59 am
That'S why you should derived tables and inner joins instead of in() .
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply