Re: Not possible to convert SQLServer timestamp column to an ORACLE column

From: N Prabhakar <prabhs_at_po.pacific.net.sg>
Date: 1996/11/22
Message-ID: <575dp7$9ih_at_newton.pacific.net.sg>#1/1


Joakim Lundberg <joakiml_at_noventus.se> wrote:
>We try to move a SQLServer application to ORACLE, but can not find the
>functionality of SQLServer's timestamp column in Oracle, i.e. AUTOMATIC
>update of a column to a unique value.
>
>I find it very surprising that Oracle lacks this fundamental
>Client/Server functionality.
>
>The best solution, I can think of, in Oracle, is to declare a timestamp
>column of datatype long (we do not need the time) and have an update
>trigger on the column that will increase it by 1 for every update. A
>DATE column (and SYSDATE) is not enough since we can have more than one
>update per second. The update trigger will cause a mutating error if you
>don't put some secret(=not in the manuals) code in the trigger.
>
>Our application programs use the timestamp column to reduce number of
>packages sent over the network. (UPDATE XXX Customer WHERE szCustomer =
>'xx' AND timestamp = xxx). Without it we must read and lock the record
>before updating to be sure that the record has not been changed by
>another user.
>
>Anyone knows a better solution?
>
>Any hints appreciated!
>
>Joakim Lundberg
>

Hi there,

Create an Oracle sequence and when you insert data into your table, populate one of the column (primary key) with a sequene. This will gurantee Unique numbers.

Regards

N.Prabhakar Received on Fri Nov 22 1996 - 00:00:00 CET

Original text of this message