• nick947 (6/19/2012)


    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

    The fact that your SQL Server restarts is troubling, and makes me think you need to rebuild SQL Server because that should not happen from running a query. What safety level is your assembly marked, SAFE? Anything else in the call stack of the error message?

    When the SQL Server restarts, what is in the SQL Server Error Log right before and after it bounces?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato