• I either get a transport error (when the sql server service restarts) or I get this error message:

    "Msg 6522, Level 16, State 2, Line 6

    A .NET Framework error occurred during execution of user-defined routine or aggregate "Median":

    System.NullReferenceException: Object reference not set to an instance of an object.

    System.NullReferenceException:

    .

    Warning: Null value is eliminated by an aggregate or other SET operation."

    What's weird is it works on all of my other queries except for one that takes about 10 seconds to complete (The others are < 1 sec).

    Nick