Re: sequences in 7.1
From: Stefan Richter <Stefan.Richter_at_Materna.DE>
Date: 1995/05/29
Message-ID: <3qcbqt$jbe_at_peanuts.Materna.DE>#1/1
Date: 1995/05/29
Message-ID: <3qcbqt$jbe_at_peanuts.Materna.DE>#1/1
In article <fiechtl.23.001758D6_at_genesis.westend.com>, fiechtl_at_genesis.westend.com says...
Hi everybody,
...
create or replace trigger count before insert on test
begin
:new.lfdnr := counter.NEXTVAL;
end;
Hmm, the problem seems to be not so difficult. But maybe i´m stupid.
Reinhard
Reinhard Fiechtl
You can use currval or nextval only in a SELECT list, the VALUES clause, and the SET clause.
So, much more easy:
INSERT INTO test (lfdnr, ...)
VALUES (counter.NEXTVAL, ...)
Stefan Received on Mon May 29 1995 - 00:00:00 CEST