Subject Re: [IB-Architect] Updatable views
Author Ivan Prenosil
> From: Claudio Valderrama C.
> > I prefer software that is doing what it is asked to do,
> > rather than such that tries to do me a favor by "anticipating"
> > my needs and trying to "help" me by doing some extra work automatically.
>
> So you don't like MS software?
> :-)

Right. How did you guess it ? :-)


> > (In SQL92, existence of non-updatable _column_ causes that _whole
> > view_ becomes non-updatable, e.g. CREATE VIEW V AS SELECT 1,ID
> > FROM TAB.
......
> the view you posted is absolutely non-updatable, at least from IB/FB
> perspective.

You should distinguish read-only _columns_ and read-only _views_.
Try this:

CREATE TABLE TAB(X INTEGER);

CREATE VIEW V(A,B) AS
SELECT X,123 FROM TAB;

INSERT INTO V(A) VALUES(456);

UPDATE V SET A=789;

Both INSERT and UPDATE will succeed in IB/FB!
But in SQL92 it is pretty muddle; if I understood official
interpreter of SQL92 (=Diane) right, in Entry level it is read-only,
but in higher levels it should be updatable.


> > No stones, please :-)
>
> I have better weapons if you're interested.

Or you can throw me as food to your pets :-)

Ivan
http://www.volny.cz/iprenosil/interbase