I just found a great post at SQL Tips by Namwar Rizvi - TSQL Function to convert decimal to Hex, Octal or any other base (http://sqltips.wordpress.c... with a great, simple function to convert any integer into a string of characters in any base from 2 through 36. Here it is, the comments include his post text, giving original credit for this algorithm to Itzik Ben-Gan in his book Inside Microsoft SQL Server 2005:TSQL Querying: IF EXISTS ( SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[fn_decTo... ......