• "Well, you're referencing the temp table without joining to it first. "

    I do not understand what this means or how to fix it . . . .thanks