Subject Re: [firebird-support] Updating base table fields not present in a view
Author Helen Borrie
At 07:30 PM 3/01/2005 +0100, you wrote:


>I have a problem setting up a VIEW to behave like I want it to.
>
>There is a base table PERSON where all data is stored.
>And there are several groups of persons that I want to treat separately
>and that I want to treat through VIEWs, such as AUTHOR, HIST_PERSON,
>COMPOSER a.s.o. For this I have a flag field in the base table called
>AUTHOR_FL...
>
>When creating the SELECT statement for the views I include a clause like
>'WHERE AUTHOR_FL = 1' and it selects the right rows.
>I would however prefer not to have this flag field in the VIEW at all
>(so no user can mess with it) but to set it directly with the VIEW.
>
>Now the problem is: if the flag field is not in the VIEW declaration,
>(how) can I tell a TRIGGER to set this field in the underlying base table?

have the flag field in the view declaration - just don't retrieve it for
the users. Query the view with a restricted column list, rather than
SELECT * FROM....

./hb