I'm coming from a different rdbms school, and new to SQL Server. I was wondering how it's possible to create a view in a stored procedure, passing a parameter value into it assigned from another stored procedure.
Maybe I don't understand you rught, but I don't see any reason to create a View IN SP code. If you need to use SP, you could run your select in it with all parameters needed. If you need View create it first and than run it from SP.
Perhaps I'm not thinking of the best way to handle this, but let me give you a quick synopsis, and maybe you can tell me whether this is the right approach.
I have a view which exists to have denormalised data from other tables.
I'm trying to incorporate the view in the sproc to allow for full automation with minimal disruption to other procedures, which also uses the denormalised views.
This is why I wanted to know if it was possible to create a view within a stored procedure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.