I created one function which updates a table using updatable cursor. I wrote
one trigger also on the same table. When i execute the function it gives
expected results. But after that all DMLs fail.
CREATE TABLE test(i int, j int);
Drop trigger test_trig;
INSERT INTO test VALUES(1, 100);
INSERT IN
"c" is not a simply updatable scan of table "test"
SELECT * FROM test;
FETCH 2 FROM c;
COMMIT;
SELECT * FROM test;
FETCH 2 FROM c;
COMMIT;
Regards,
Dharmendra
www.enterprisedb.com
On 10/25/07, Simon Riggs <[EMAIL PROTECTED]> wrote:
>
> On Thu, 2007-10-25 at 12:
If a cursor is declared using "Order by" then it gives following error
during updation of the cursor:
ERROR: cursor "c" is not a simply updatable scan of table "test"
Ex:
DROP TABLE IF EXISTS test;
create table test (num int,num2 int );
insert into test values(1,100);
insert into test values(2,200
b SET num=500 WHERE CURRENT OF c;
DELETE FROM tab WHERE CURRENT OF c; --> This delete fails.
SELECT * FROM tab;
FETCH 2 FROM c;
COMMIT;
SELECT * FROM tab;
FETCH 2 FROM c;
Is this as expected..??
Thanks,
Dharmendra Goyal