Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: generating sequence from access link table
Use a trigger like this one :
CREATE OR REPLACE TRIGGER autonumber BEFORE INSERT ON tablename
REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW BEGIN
SELECT sequencename.NEXTVAL INTO :NEW.pk_field_name FROM DUAL;
END;
"Dave Nguyen" wrote in message ...
>can anyone please tell me if this is possible? I have
>a link table from access 97 to a table in oracle
>7.3.4. I want to create sequence so that it performs
>just like access has autonumber for its primaty key.
>how can i go about doing this so that as they add
>records through an access form, it will assign the
>next sequence #. sorry if this is not clear ...
>thanks in advance,
>Dave
>
>
>
>*** Posted from RemarQ - http://www.remarq.com - Discussions Start Here
(tm) ***
Received on Mon Dec 28 1998 - 22:37:47 CST