Re: Problem with views
From: MNAHanda <mnahanda_at_aol.com>
Date: 1995/12/18
Message-ID: <4b5f99$cr_at_newsbf02.news.aol.com>#1/1
Date: 1995/12/18
Message-ID: <4b5f99$cr_at_newsbf02.news.aol.com>#1/1
>> : SQL> --but this works:
>> : SQL> INSERT INTO SST (id, VAL) SELECT MIN(USERENV('SESSIONID')),
SUM(VAL) FROM
>> : SST WHERE ID=USERENV('SESSIONID');
>> : 1 row created.
>>
>> It seems that Oracle does not think USERENV('SESSIONID') is a constant.
Looks like the real problem here is with your SUM( ) function. The above statement succeeds because it affects only one row. SUM( ) is a group function, and cannot be used to update multiple rows simultaneously in this situation.
Manisha Received on Mon Dec 18 1995 - 00:00:00 CET
