• Sean Lange (3/19/2015)


    Nuhamovici (3/19/2015)


    Can you share the code that does this? Calling sp_who from within a function?

    Why? What could you possibly gain from calling a stored proc from within a function? You should instead get rid of the function entirely.

    If you can explain what you are trying to do we can help you find a better approach than calling a stored proc from a function.

    It makes it easy to filter when you're in a hurry... real easy.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)