Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

MS SQL function that converts base-10 to base-36

Avatar of James Talvy
James TalvyFlag for United States of America asked on
Microsoft SQL Server
2 Comments1 Solution1169 ViewsLast Modified:
I would like to convert an integer in a database table to a 4 character unique code (basically base-36).

Each position in the 4 character code can be 36 combinations thus the max integer can be 1,679,615.

0 = 0000
1 = 0001
10 = 000A
15 = 000F
16 = 000G
27 = 000R
35 = 000Z
36 = 0010
...
1,679,615 = ZZZZ

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of James Talvy
James TalvyFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers