Subject Re: [firebird-support] Is it possible to have a view with parameters?
Author Helen Borrie
At 12:02 PM 31/03/2011, you wrote:
>Hello Michael
>
>But that is a SELECT, not a VIEW.
>
>I want to use parameters with CREATE VIEW.

You create the view over an entire set of data. Then, when you want to use the view, you use it like a table, including SELECTing from it. If the data set is not naturally updatable, you can make it so, using triggers.

Michael's response is exactly correct, although not all the way there for a substitutable parameter:

SELECT NAME FROM V_PEOPLE WHERE BIRTHDAY = :birthday (if you are in the Delphi world), otherwise
SELECT NAME FROM V_PEOPLE WHERE BIRTHDAY = ?

./hb