• I think you need to change the DB context to have it search against whichever DB you are interested in.

    As for "#temp" vs. "tempdb..#temp", this should make no difference in the code's performance.