• Nope, they're not... not without a lot of workarounds.

    You can't control the order that the WHERE clause decides to apply the filters in. You can't even control if a WHERE clause fires before or after a conversion of data in your select statement.

    The primary way to control for things like that is using temp tables to control event orders. There IS a switch to use, called OPTION ( FORCE ORDER), that combined with subqueries can give you that kind of control. I recommend you don't go near it until the answers to questions like this are second nature. It's incredibly easy to shoot yourself in the foot when 95% of the time a #table does what you need and keeps you from doing that.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA