|
Posted by jim_geissman on 05/03/06 00:32
I know the order of preference. Let's say that exact matches take
preference over wildcards, or alternatively they should be in ascending
order by the Category column.
My question is, given that I know it, how to ensure the matching is
done in that order, as opposed to randomly or according to the whims of
SQLS. I'm thinking that multiple passes may be required, but I would
like to avoid that on the assumption it would be quicker to do it all
at once.
For example, to do them in order by Category, I could outer join the
candidates to (SELECT * FROM #Filters WHERE Category=1) AS f1 ON ...
and also outer join to (same thing, Category=2) AS f2, and so forth.
Would those matches be attempted in the order the joins appear?
Thanks,
Jim
Navigation:
[Reply to this message]
|