Home Forums Programming CLR Integration and Programming. How To Register & Run MDX Query Using CLR Programing in SSAS Server (Assemblies) RE: How To Register & Run MDX Query Using CLR Programing in SSAS Server (Assemblies)

  • Usually you would not hard-code the text of a query into CLR like this. In Analysis Services, you can only create CLR stored procedures - unlike in relational databases, where you can do CLR data types, triggers, aggregate, etc. You would call an Analysis Services stored procedure much like a function that operates on a row returned by a query, such as SELECT Column1, Column2, MyStoredProcedure(Column3), etc.

    What you're trying do is much more like hard-coding the definition of a view, which isn't the usual use case. But if you really wanted to do that, you could use syntax like "CALL MyStoredProcedure." I was just writing a blog post the other day on how to do this with SQL Server Data Mining, but haven't posted it yet in my series at http://www.sqlservercentral.com/blogs/multidimensionalmayhem/2013/04/26/a-rickety-stairway-to-sql-server-data-mining-part-11-model-comparison-and-validation/. If you let me know the text of the errors you received, I might be able to help.

    -- Steve