I am trying to build a user defined aggregate that will use the Linear Regression formula to give me the slope of a trend line. This means that my aggregate will need two input parameters rather than one.
My starting point was http://blog.effiproz.com/2010/06/multi-parameter-clr-user-defined.html
I must have hit every possible error message that it is possible to hit in trying to write an aggregate. Everytime I think I have taken a step forward I get either a new error message or go back to one I had before.
I've had the UDAGG error messages, the IBinarySerializer messages, you name it.
I am currently getting the UDAGG message and a message for the CREATE AGGREGATE statement that is telling me that my CLR types don't match my T-SQL types.
I am using Visual Studio 2008 and SQL2008 Developer Edition.
Format.Native, //use clr serialization to serialize the intermediate result
IsInvariantToNulls = false, //optimizer property
IsInvariantToDuplicates = true, //optimizer property
IsInvariantToOrder = false //optimizer pro
View Complete Post