Storing formula (equations) in database to be evaluated later (SQL Server 2005)

前端 未结 4 1019
[愿得一人]
[愿得一人] 2020-12-10 20:09

I\'m calculating linear regressions based on a data set. I do not know the regression model or number of parameters at compile-time.

I\'m storing the regression equa

4条回答
  •  半阙折子戏
    2020-12-10 21:05

    This is not an answer but I don't have enough reputation to comment.

    "You could write a CLR stored procedure that still uses NCalc to do the calculation."

    You COULD do this, but remember that you can only add references to Sql Server Projects which can only reference other Sql Server Projects. So you COULD create a SqlServer Project and link all the files from the NCalc project and try to build that but then you will have to do the same with all the references of the NCalc project as well. Not all of which are open-source. I suppose you COULD use Reflector to decompile all these references and put those file in a SqlServer Project as well.

    But if you did do all this and finally get your solution to build then you'd probably find out that you can only add the reference as an UNSAFE reference which would mean you'd have to start changing all sorts of SqlSever permissions...

    At which point you'd probably give up.

    What I'm trying to say is there is a lot more work here than the original answer suggests!

提交回复
热议问题