Subject RE: [firebird-support] Views and parameters
Author Thomas Steinmaurer
> >>Very basic SQL question, sorry for that, but can i pass a parameter to a
> >>view?
> >>
> >>
> >
> >Only in a regular SELECT statement when querying
> >the view, as you do it with tables when using a
> >parametrized query.
> >
> >Views don't support input parameters like stored
> >procedures do.
> >
> >
> >
> Thanks for you quickly help. I lost something using SP? I mind, using SP
> i get all the advantages of using a view like precompiler optimizations
> of the query ionside the SP?

When you send a CREATE [OR ALTER] PROCEDURE statement
to the server, it gets parsed, syntactical analyzed,
optimized and compiled into BLR, like it is done with
a view. The optimization plan doesn't get stored with
the SP, so the PLAN is generated every time you will
use the SP.

Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions