Re: Custom Sequence Generator

From: Hans Forbrich <fuzzy.graybeard_at_gmail.com>
Date: Wed, 15 Oct 2014 16:53:37 -0600
Message-ID: <543EFAF1.2070808_at_gmail.com>



Consider using a decimal to hex converter, passing in a regular sequence, as in
http://www.club-oracle.com/articles/how-to-convert-decimal-to-hexadecimal-171/

Careful review of that code can convert it to base 36 or base 62 as well. Might not be fast though.

/Hans

On 15/10/2014 3:56 PM, Ebadi, Abdul wrote:
>
> Re-phrasing the question to:
>
> If one wanted to use an extended baseX series of number/letters,
> allowing to have shorter string to represent the larger
> range(10^28)....how could you do that with Oracle?
>
> Thanks,
>
> Abdul
>
> *From:*oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] *On Behalf Of *Hans Forbrich
> *Sent:* Wednesday, October 15, 2014 2:48 PM
> *To:* oracle-l_at_freelists.org
> *Subject:* Re: Custom Sequence Generator
>
> Given that the documentation states
>
> MAXVALUE Specify the maximum value the sequence can generate. This
> integer value can have 28 or fewer digits for positive values and 27
> or fewer digits for negative values. MAXVALUE must be equal to or
> greater than START WITH and must be greater than MINVALUE.
>
> and you only want to use 12 out of the possible 28 digits, what
> exactly is your concern?
>
> /Hans
>
> On 15/10/2014 2:28 PM, Ebadi, Abdul wrote:
>
> Hi,
>
> We have a need to generate a 10 or 12 digit unique key. Anyone
> have a quick function for this? For example: 435A24C1.
>
> We don’t want to use Oracle’s sequences as we are afraid we will
> run out of unique ones. We need billions of these keys.
>
> Thanks,
>
> Abdul
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Oct 16 2014 - 00:53:37 CEST

Original text of this message