• I'm not convinced you can do what you're trying to do in that manner. Tempdb is generally the work space for sql server for sorts, groups bys, spools, distincts and of course temp tables, where possible sql server will attempt to do this in memory but will tend to use tempdb.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/