Re: find max id for forms
Date: Tue, 07 Aug 2001 18:55:08 +0100
Message-ID: <3B702B7C.1B5C_at_yahoo.com>
CupOfWater wrote:
>
> Hi, I have a form that has a field, mid denoting membership ids. This
> corresponds to an ORACLE table that has mid, name, etc. Instead of
> having the users find the highest mid from the database and enter the
> next highest one, I want the form to automatically find the largest
> mid and add 1 to that number and put the result into the mid field. I
> don't know how to do this, but I think it involves some triggering of
> some sort and PL/SQL, but I don't know which trigger(s) would be
> appropriate. Thanks.
>
> Kevin
This sounds like very very bad news....What this implies is that you have a bottleneck because everyone has to queue up behind each other in order to get the next record (because if more than one person do "select max(blah)+1" then you'd get a duplicate record....
Maybe look at using a sequence...
hth
connor
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Tue Aug 07 2001 - 19:55:08 CEST