sequences in 7.1
Date: 1995/05/26
Message-ID: <fiechtl.23.001758D6_at_genesis.westend.com>#1/1
Hi everybody,
i think i´ve a really simple problem, but i´m not able to solve it.
i defined a table TEST with a row LFDNR. This row should contain a unique number. For this i defined also a sequence counter.What i want is, that before the new line is inserted in the db the LFDNR gets its unique number. I thougt that the lines down will work but they wont. I am really not firm in programming SQL. So maybe you can help me about this problem.
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
Aachen, Germany
fiechtl_at_genesis.westend.com
Received on Fri May 26 1995 - 00:00:00 CEST