• Piotr.Rodak (10/27/2010)


    Having said that, wouldn't you be looking for something like

    select #tmp.key1, #tmp.key2 FROM #tmp

    inner join

    (

    SELECT key1 FROM #tmp

    EXCEPT

    SELECT key1 FROM #tmp2

    ) q on #tmp.key1 = q.key1

    ?

    Regards

    Piotr

    Pretty much, but hadn't realized that the subquery, and thus a different execution plan, would be required.


    - 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