Subject | Re: [firebird-support] Is it possible to have a view with parameters? |
---|---|
Author | Helen Borrie |
Post date | 2011-03-30T23:27:20Z |
At 12:02 PM 31/03/2011, you wrote:
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
>Hello MichaelYou 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.
>
>But that is a SELECT, not a VIEW.
>
>I want to use parameters with CREATE VIEW.
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