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 generate alpha-numeric sequence in Oracle?

Re: How to generate alpha-numeric sequence in Oracle?

From: <kranilk_at_gmail.com>
Date: 29 Nov 2006 07:09:07 -0800
Message-ID: <1164812947.031592.273030@l39g2000cwd.googlegroups.com>


Hello,

My sincere thanks to everybody for all the suggestions given above and I apologize for not replying earlier as I got pulled into another project that needed immediate attention.

As regarding the justification for the business case, the client is saying they have always used this type of sequence and they want our system (which they just bought now) to be capable of generating this sequence. As far as performance goes, our client says that at most they might use about 5 sequences a month.

Thanks again for all the help.

On Oct 31, 2:33 pm, Brian Peasland <d..._at_nospam.peasland.net> wrote:
> kran..._at_gmail.com wrote:
> > Hello All,
>
> > After searching the web unsuccessfully for what I am looking for, I
> > have come here.
> > I need to generate a 6 digit alpha-numeric sequence of values that
> > looks like the following.
> > 00001A
> > 00001B
> > :
> > 00001Z
> > 00002A
> > 00002B
> > :
>
> > Do any of you know how to generate the above using sequence in Oracle?
> > Any information and/or pointers will be very helpful to me. And, of
> > course, any sample code would be greatly appreciated. I mainly work in
> > Java. We are using Oracle 9i.
>
> > Thanks in advance for all the help.You could do this programmatically by creating your own function. An
> Oracle sequence will only generate integer values. However, you can
> extend this. Think of hexadecimal....with values from 0 to 9 and A to F.
> If you were given a decimal integer, you would easily write a routine to
> convert it to hex. Just do the same thing, but the values are from 0 to
> 9 and A to Z. Store your code in a function. Have that code get the
> sequence's next value and the do the conversion.
>
> HTH,
> Brian
>
> --
> ===================================================================
>
> Brian Peasland
> d...@nospam.peasland.nethttp://www.peasland.net
>
> Remove the "nospam." from the email address to email me.
>
> "I can give it to you cheap, quick, and good.
> Now pick two out of the three" - Unknown- Hide quoted text -- Show quoted text -
Received on Wed Nov 29 2006 - 09:09:07 CST

Original text of this message

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