Parameterised Views

Background

Occasionally I see posts on Oracle sites from users asking how to create a view based on parameter(s).  Now, many would ask why would you’d need this, especially when you can simply select from the view and apply a where clause?  Well, there are a few situations which fall outside of that approach, the commonest it probably that the view contains a function that needs parameters or the view requires some “state” in its operation (state means there is memory of the past).  Anyway, assuming you have such a need let’s look at some of the approaches at our disposal.
Read more…