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: How to create a 6 byte alphanumeric sequence?

Re: How to create a 6 byte alphanumeric sequence?

From: Martin Doherty <martin.doherty_at_oracle.nospam.com>
Date: Fri, 25 Oct 2002 17:25:39 -0700
Message-ID: <gnlu9.11$Im4.281@news.oracle.com>


Can this key sequence tolerate gaps? If so, a solution might be built by applying a function to <sequence_name>.nextval to convert a base 10 number into a base 26 number. If not, then you will need to make the sequence transactional e.g. next_available_key is stored in a row of a table, and becomes a source of contention (it will serialize your transactions).

For performance, I would go with the first approach if possible.

Martin

raoul wrote:

>I am looking for a code snippet or any suggestions on creating a 6
>byte alphanumeric sequence in PL/SQL or SQL*Plus. Example: 123DE5 I
>will be using this program to generate and populate a table with these
>6 byte alphanumeric sequences to be used by my applications. So the
>sequence must increment by one.
>
>Any help will be greatly appreciated.
>
>Thanks,
>R.
>
>
Received on Fri Oct 25 2002 - 19:25:39 CDT

Original text of this message

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