Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Using Common Table Expressions (CTE) in a DSV Named Query

$
0
0

Hi,

I have a scenario where I need to "generate" fact data, so I'm using a CTE to generate the data. For maintainability reasons I have this CTE declared inside a view and in the DSV Named Query I just have a SELECT * FROM FactView.

This works fine as long as the recursion level falls within the default limit of 100. If it does not, I have to specify the maximum recursion level such as:

SELECT *

FROM FactView

OPTION (MAXRECURSION 0)

The problem is I can't specify the Named Query like this. As explained elsewhere my query is embeded as a subquery and the OPTION keyword cannot be used in a subquery.

Is there any other way I can specify the maximum recursion level on a Named Query?


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>