• ... however I can see in the proc the same table is called again later on, so putting in a temp table may be the way to go.

    Then it's logical to put the result into temp table.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]