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

Home -> Community -> Usenet -> c.d.o.server -> How to generate unique document number ?

How to generate unique document number ?

From: <krislioe_at_gmail.com>
Date: 12 Sep 2006 20:20:18 -0700
Message-ID: <1158117618.035719.54540@e3g2000cwe.googlegroups.com>


Hi All,

We need to generate Document Number where there should be any gap, so that we cannot use sequence. For example : Invoice Number.

one possible approach like : Select MAX(InvoiceNumber)+1 from invoice, what if that table has millions of rows, is this reliable enough ? How to avoid two user do the same query at same time that lead to dupplicate number ?

Anybody has done it this way in production? or any other approach ?

Thank you for your info,
xtanto Received on Tue Sep 12 2006 - 22:20:18 CDT

Original text of this message

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