Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 Dynamic View via SQL CLR Function

Author  Topic 

Simon.Yoffe
Starting Member

2 Posts

Posted - 2009-06-23 : 19:18:28
Hi,

I trying to create a dynamic view, that does SELECT * FROM Table with dynamic filter.
The filter is built by meta data that is stored in the database.
Currently I implemented it by an SQL CLR TVF function that reads the meta data from the database and builds the query + filter and returns the result back to the Sql Server.

The problem is the data that is returned by my view is not indexed, unlike the original table, this means that any subsequent join on the view will cost more.

Is there any solution to that issue? or maybe I doing it in the wrong way and SQL CLR is not the solution?

Simon Yoffe
   

- Advertisement -