Subject | Re: [firebird-support] Is it possible to have a view with parameters? |
---|---|
Author | W O |
Post date | 2011-03-30T23:31:22Z |
Ok, thank you Helen, I shall try that.
Walter.
Walter.
On Wed, Mar 30, 2011 at 7:27 PM, Helen Borrie <helebor@...> wrote:
>
>
> 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
>
>
>
[Non-text portions of this message have been removed]