Oracle lameness and empty sets :(
So I wanted to run a query which would return a number of rows if their ids were in a set:
select url from page where id in (....)
This works fine.
Unfortunately it breaks horribly if the set is empty. Why? There is no mathematical ambiguity about an empty set. Why would oracle simply not return 0 rows?
John Dale
Why, God, why?
08 Mar 2006, 13:39
:)
It is particularly frustrating because it isn't intuitive and managed to escape the plethora of unit tests and integration tests because it never occurred to me that it would be a problem :)
Oh well…..
08 Mar 2006, 14:04
Chris May
it's bizarre. This fail works:
but this works fine It seems to be something as lame as oracle's parser not understanding that () is the empty set. Wierd.08 Mar 2006, 20:57
Chris May
… though not as weird as my spelling.
08 Mar 2006, 20:58
Add a comment
You are not allowed to comment on this entry as it has restricted commenting permissions.