OraQA

Oracle Question and Answer

  • Do you have a solution to a problem? Do you have an unanswered question? Login and share it with the Oracle community. More...

Oracle News


Entries RSS feed

Comments RSS feed

Create Alphanumeric Sequence in SQL?

August 10th, 2008 By Chetana

How can I create an alphanumeric sequence in SQL (without using the decode function and all)? I’m using SQL*Plus. Thanks.

3 Responses to “Create Alphanumeric Sequence in SQL?”

  1. hsafra Says:

    You need to give more specs for the question: What letter are acceptable? What letters aren’t? Do you need special ordering? What about gaps?

    I’d wrap an Oracle sequence in a function that translates the number from the sequence to a string using the specs you need.

  2. Laurent Schneider Says:

    if you like a Base64 format, maybe this…

    select
        utl_raw.cast_to_varchar2(
          utl_encode.base64_encode(
            utl_raw.cast_from_binary_integer(
              lsc_s.nextval
            )
          )
        )
    from dual;
    
  3. oo Says:

    convert integer number to it’s binary format

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this question