I found this post http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=3807&HighLight=1 that mentions support for CAST coming in 2.0. I have a scenario where we need to construct the following condition in a where clause:
WHERE bit_column = cast(1 as bit)
This is to support an index that we have on a bit field that has a very skewed distribution 95% 0, 5% 1 and is therefore a good candidate for an index eventhough it is a bit field. Anyway, essentially we need to force the optimizer to do an index seek rather than a scan and as is well known, the statement:
WHERE bit_column = 1
causes the optimizer to convert the bit field to an int using a convert function which ultimately results in a scan rather than a seek.
We are running LLBLGenPro v1.0.2005.1, SQL Server 2005, is support for doing something like this built into this version of LLBLGenPro or do we still need to write a custom predicate
or CompareValue overload?
Thanks in advance...