On Friday, July 15, 2011 6:02:25 PM UTC+2, Thomas Mueller wrote: > > Of course the trick to change AGE > 0 to AGE >= 1 works, but adding > that to the database engine is a bit tricky (it only works for integer > data types, and only for constants but not parameters as there are > problems with Integer.MAX_VALUE). Of course, a workaround is to use > this trick within the application :-) >
Couldn't you simply replace "age > 0" by "age >= 0 and age <> 0" in every case? It works also for non-integers and the inequality should be able to use the index while the equality should take care for the border cases... Regards, Maaartin. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/zkqLQUB6vKcJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
