Anyone know SQL Server? This is not so much a process question as a "have you seen this bloody bug" question.


This returns a ton of rows :
select a.[HaulerId], a.[ExitOn], a.[ProcessOn]
from [Hauler] a
where a.[ProcessOn] is null


This returns some rows, all with [ProcessOn] NULL:
select a.[HaulerId], a.[ExitOn], a.[ProcessOn]
from [Hauler] a
where a.[ExitOn] is null


This returns NOTHING:
select a.[HaulerId], a.[ExitOn], a.[ProcessOn]
from [Hauler] a
where a.[ExitOn] is null
and a.[ProcessOn] is null


I've recreated indexes, dropped constraints, and generally moved everything around the table I could. I don't have the luxury of recreating the table, though I'm reasonably sure that would fix it.

I tried this and it worked as expected:
select a.[HaulerId], a.[ExitOn], a.[ProcessOn]
into #foo
from [Hauler] a

select a.[HaulerId], a.[ExitOn], a.[ProcessOn]
from #foo a
where a.[ExitOn] is null
and a.[ProcessOn] is null


WTF?!?!? Anyone ever seen this kind of crap?
.

Profile

baavgai: (Default)
baavgai

Links

Most Popular Tags

Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags