Subject RE: [firebird-support] Read-Only View
Author Peter Gore
Thanks for your input so far. But my point is that, according to the
Firebird Book (my bible) states on page 493, that a view will be
read-only if its SELECT statement has any of the following

* Specifies a row quantifier other than ALL ....
* Contains fields defined by subqueries or other expressions
* Contains Fields defined by aggregating functions....
* Includes UNION ....
* Joins multiple tables
* Does not include all NOT NULL columns from....
* Selects from a non-updateable view.

My query has none of the above characteristics so I would expect it to
be naturally updateable. I therefore assume this is a bug (which I have
already entered into the tracker)


Peter Gore

Intel Systems Manager

(ddi) 01277 376433

(swb) 01277 372916

(mob) 07891 911989


[] On Behalf Of Paul Lopez
Sent: 25 March 2011 02:20
Subject: RE: [firebird-support] Read-Only View

> At 10:15 PM 22/03/2011, gorepj wrote:
> >I have created a view which is unexpectedly read-only. It derives
from the
> following SQL.
> >
> >select *
> >
> >This View is non-updatable
> >
> >If I remove the ORDER BY Clause it becomes updatable. I can't see in
> documentation that having an ORDER BY clause will make a view
> I don't know why it would be updatable, as an ordered set is not a
> set.
> ORDER BY in a view is quite a recent addition, too. I wondered if it
was an
> accident! There doesn't seem to be much use for it.
> ./hb

I wonder if it has something to do with needing to order by a unique or
primary key, or provide order by fields that identify records uniquely?

Is the IFLG01 field unique? Could you add more fields to order by in
order to make the order by unique?

Just a theory... I haven't tried it.


Martin McColl Ltd, Ashwells Road, Brentwood, Essex CM15 9ST

This e-mail including any attachments is intended only for the addressee
named above and it may contain confidential or privileged information
If you are not the intended recipient please notify the sender and note
that the contents must not be disclosed to anyone else, no copies can be
taken and all existing copies must be destroyed
Martin McColl Ltd will not be liable for any error in transmission
You should carry out your own virus checks before opening any attachments.
Opinions, conclusions and other information in this message
and attachments that do not relate to the official business
of Martin McColl Ltd are neither given nor endorsed by it

[Non-text portions of this message have been removed]