Try http://oraqa.com/2008/04/19/how-to-convert-number-from-any-base-to-any-other-bases-in-sql/ I used this idea to generate a 32 digit unique number (used 0-9A-Z minus vowels to avoid *naughty* words), works well. Note I am not saying it will scale well, but works well. Raj