Kashmira Patel (kupatel) wrote:
> Hi all, Is it possible to create views that take parameters?
> Basically, I have to create some very complex historical reports, and
> as of now I am using temporary tables to store intermediate query
> results. I calculate values based on the content of these temporary
> tables and use them in the final result. I would like to eliminate
> the need for temporary tables and use views instead, as the data copy
> between the temp tables is taking quite some time.
You can write a function (in SQL even) that would basically be a
parameterised view.
However, views don't "store" anything, so whether you see an improvement
in speed will depend on how long it takes to do your calculations.
-- Richard Huxton Archonet Ltd