|
Posted by manstein on 11/09/26 11:36
Erland
It is actually a commonly held myth that columns wrapped in
expressions are not indexable. Sql server 2000, and later, has an
optimization strategy called "Folding" which allows the optimizer to
identify certain types of indexable expressions even when the column is
nested in a function. The optimizer is able to use Folding only in
certain circumstances but it is numeric and date columns were it is
most likely to be used.
As a general rule, i try to answer the specific question that the
poster asked and not the question i want to answer. This really is
rampant on these groups. Often, the first thing a responder will ask
is "why do you want to do it that way?" This is usually follow up with
a (false) claim that i cannot be done the way the poster envisioned.
SQL is an amazingly orthogonal language. (In computer science
parlance, this means that the language is very expressive and its
components can be combined in surprising ways). Many things can be
done that others claim can't. TGear was asking how to match values
EQUAL to a certain date, not over a range of dates. Therefore, for
that reason, my answer is the clearest and most accurate in addressing
his question. Thanks
Navigation:
[Reply to this message]
|