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.
Author |
Topic |
mikemadison
Starting Member
12 Posts |
Posted - 2012-03-04 : 18:48:54
|
Hello,In a stored procedure, I have a view as my data source. Unfortunately, views restrict the use of parameters. In my case, I need to get a value into the view from which to filter the data. This needs to happen inside of the view as this process needs to be isolated. What are my options? What about a nested stored procedure? Thanks in advance for any assistance.Mike |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-03-04 : 19:09:29
|
From your description, it is not clear to me why the filtering/WHERE clause cannot be in the SELECT statement that you would be using in the stored procedure. Usually that is what I have seen people do.Nonetheless, if you must use a nested stored procedure, it can be done for example, via a temp table, table-valued parameters etc. See Sommarskog's blog for a discussion. |
 |
|
|
|
|