Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: NEWBIE: Autonumber trigger

Re: NEWBIE: Autonumber trigger

From: Jürgen Lietz <jlietz_at_talknet.de>
Date: Wed, 26 May 1999 20:05:46 +0200
Message-ID: <xJW23.405$46.42383@news.tli.de>


Dear David, please excuse me ...
I was a bit/lot confused about the sender of your message and another a few lines above (in my reader).

Please replace all occurences of 'Mary' with 'David'.

Thanks a lot
juergen

Jürgen Lietz schrieb in Nachricht ...
>
>Fred Ruffet schrieb in Nachricht
><7ieeeo$5ff$1_at_gatekeeper.ornano.kapt.com>...
>>I don't think trigger is the better way for two major reasons :
>>1. Oracle will refuse, when executing a trigger AFTER (or even BEFORE)
>>INSERT, to make operations on your table (like for example counting the
>>number of elements in the table).
>>2. The number you want to set in the trigger is the primary key, and you
>>couldn't process the insert statement whithout having this value.
>>
>
>You are definitifly WRONG. You can build a Trigger
>'before_insert_on_each_row'
>and you will be able to do ':new.PKField := seq.NextVal' ( Maybe it's
wrong.
>I'm not so firm in PL/SQLwithout docs).
>
>For Mary: tere is a tool called something like 'Access Migration Wizard'
>lokated on your Oracle Client Software CD or (i thing) on Oracle's web
site.
>It can convert your whole(?) Access App to work with Oracle as backend and
>it can create correct triggers for 'Autoincrement Fields'.
>
>>A better way would maybe to do the insert within a PL/SQL procedure, which
>>one you would be passing as args the values of the field to insert.
>>
>You are right. But Mary said: 'I'm VERY new to PL/SQL, ..' and she has to
do
>whole bunch of work in converting/adopting her app(s).
>>
>>David Rabsch a écrit dans le message <374ab0a1.4209402_at_news.mts.net>...
>>>Hi, real newbie here. I'm trying to create an application using MS
>>>Access 97 as a front end and Oracle 8 for Netware as the back end. I
>>>created the app entirely in Access, and now am migrating the data to
>>>Oracle. Does anyone have a simple trigger to emulate the AutoNumber
>>>function in Access? I'm VERY new to PL/SQL, but pretty seasoned in
>>>VB, and comfortable in SQL. Thx.
>>
>>
>
>Juergen Lietz
>
>
Received on Wed May 26 1999 - 13:05:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US