Robert Read (rread@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN) wrote:
: I am trying to run this statement with Informix 7.10:
: INSERT INTO a
: SELECT 1, b.* FROM b
: B is view that is a join between table A and another. When
: this statement is run, I get this error:
: -360: Cannot modify table or view used in subquery.
: Of course the text of the error is correct (the view _is_
: readonly), but I'm not updating the view, so why does it
: care?
: Of course there are workarounds, but is this a fug or a
: beature?
My guess is an (admittedly bothersome) feature. Since the view is joined
to table a, and you are modifying table a, you really are modifying the
view. I think you're going to have to read b into a temp table first,
then insert by selecting from the temp table.
--
=======================================================================
Dennis J. Pimple dennisp@informix.com Opinions expressed
Principal Consultant -------------------- are mine, and do not
Informix Software Inc Voice: 303-850-0210 necessarily reflect
Denver Colorado USA Fax: 303-779-4025 those of my employer.