Reading Books Online topic CREATE VIEW, I find that a view may be created with a SELECT statement only.
Unlike the INSERT which may use
EXECUTE stored_procedure @parameters
to load rows into a table. This might be useful depending on what you need to do with the VIEW. For instance, you could create a temporary table in a stored procedure and insert rows using another stored procedure as the source.
Code:
CREATE PROCEDURE proc_search_nursery_stock (
@searchFor VARCHAR(55)
)
AS
CREATE TABLE #results (id INT, plant_name VARCHAR(255))
INSERT #results (id, plant_name)
EXECUTE proc_list_mature_plants_of_type @searchFor
SELECT * FROM #results
Not sure what you mean by an IN parameter, INPUT parameter perhaps?
Thank you for your answers guys.
The reason I wanted to do that is I need to create metadata
off of a stored procedure with one IN Parameter in
WebFocus and it would not let me do that.As long as there
is no parameter coming in or out it's fine but it goes
crazy with parameters. So I thought may be one way around
it would be creating a view that calls the 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.