Can you alter a view from a stored procedure? I need to send criteria to the view from the parameter of the procedure.
I tried putting the ALTER VIEW code right after the AS in the CREATE VIEW statement. The error returned was “Error near key word VIEW”.
Let's start with the fact that you don't want to alter a view from a stored procedure if you have multiple users.
If you want to write a query with parmeters I suggest you use a stored procudre and just write the query without using the view at all (or only as the source of records for the query). There is no advantage that I can see to using a view in this case.
The thing is that I have something on the order of 40 users right now. No user can see the other useres data with the exception of the headquarters persons (2). The database front end is Access and the reports that the users need are based on the views that they can see. In reality none of the useres do much more than enter data in forms and then a case number when they want a report. I have that working on the front ends, but I would like to take any code out of the front ends. In other words only one person at a time would alter one of the views and then even if there were two people hitting the same view it would be almost imposible for them to hit at the same time since not more than two see the same view.
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.