Re: Insert from Select
Posted in 2003
CREATE TEMP TABLE t(i INTEGER NOT NULL);
INSERT INTO t VALUES(10);
INSERT INTO t SELECT i + 10 FROM t;
-- Ok until here :
-- Trying to set all columns to 0
UPDATE t SET i = i - (SELECT i from t tx WHERE tx.i = t.i);
360: Cannot modify table or view used in subquery.
... So ...
it works for INSERTs but not forUPDATEs...
that's some advance,
Jean Sagi.
Kristofer Andersson wrote:
> John Carlson <john_carlson@whsmithusa.com> wrote in message news:<3e1divsi7b4vanoh7955bc7jcl4j72pmlv@4ax.com>...
>
>>We're on 9.30.HC3 . . . no problems. Is this a table or a view??
>>
>
>
> Table. But looking back at it, it was not an insert but an update. So
> maybe it has been fixed for insert but not for update...?
>
>
--
Atte,
Jes's Antonio Santos Giraldo
jeansagi@myrealbox.com
jeansagi@netscape.net
sending to informix-list