score:0
Accepted answer
Read More
- how to encode int with base32 in sql server 2008
- How to: Create trigger for auto update modified date with SQL Server 2008
- How to create duplicate table with new name in SQL Server 2008
- How can I use the MS JDBC driver with MS SQL Server 2008 Express?
- How to set two columns in SQL Server database as auto increment int with increment seed 100?
- How do I add a column, with a default value, to an existing table in SQL Server 2008 or 2012?
score:1
Pretty sure this will need some debugging but should be close. I translated from a c# function I found that converts base10 to base32.
CREATE FUNCTION dbo.Base10toBase32 (@pInput int)
RETURNS varchar(100)
AS
BEGIN
Declare @pSet char(32)
Declare @pRslt varchar(100)
Declare @pRmdr int
Declare @pPos int
SET @pSet = '0123456789ABCDEFGHIJKLMNOPQRSTUV'
SET @pPos = @pInput
WHILE @pPos > 0
BEGIN
SET @pRmdr = @pPos % 32
SET @pPos = @pPos / 32
SET @pRslt = SubString(@pSet,@pRmdr+1,1) + @pRslt
END
RETURN @pRslt
END
score:1
If you're looking for human-readable base32, check out Crockford's: http://www.crockford.com/wrmg/base32.html
Looks like a Dell service tag -- avoids confusion between 1 0 I L etc...
More questions
- how to work with after insert trigger in sql server 2008
- How to merge multiple rows in one single column field with given condition in SQL SERVER 2008
- How to return XML from SQL Server 2008 that is structured with multiple selections sharing a common parent
- How to get the attribute value with XQuery in MS SQL Server 2008
- How to generate create script of tables with their constraints using SQL query in SQL Server 2008
- User-Defined Aggregate in SQL Server 2008 - How to deploy with MaxByteSize = -1?
- How to use ORDER BY, LOWER in SQL SERVER 2008 with non-unicode data
- How to display the multiple values in a single column with line by line in SQL SERVER 2008 R2?
- How to find duplicate entries with different values in one column SQL Server 2008 R2
- How to insert large amount of data into SQL Server 2008 with c# code?
- How to use SUBSTRING With Distinct in sql server 2008
- How to alter column from int to Uniqueidentifier in SQL Server 2008
- How do you work with SQL Server CE and SQL Server 2008 Express?
- How to login with newly created server name in sql server 2008
- How i can authenticate in SQL SERVER 2008 with Active Directory User but without Windows Authentication
- How to use WHILE LOOP to add value to list with condition, SQL Server 2008
- Seeking advice on how to structure the SQL Server 2008 DB table with large amount of data?
- How do I grant access to my SQL Server Express database to a specific user with Visual Studio 2008 tools?
- How to assure that certain data in SQL Server 2008 can only be accessed with my software?
- How can I install SQL Server Express 2008 with Advanced Services?
- How to write UPDATE from XML with Table Alias in SQL Server 2008 already have a 'From' statement
- SQL Server 2008 R2 - How to filter a group of records with conditional logic?
- How to make a remote connection with SQL Server 2008 with ADO.NET entity Data model from C# winform
- How can access SQL SERVER 2008 in local PC with only IP?
More questions with similar tag
- Should a development environment disable foreign keys?
- SQL Server - Top Saleperson Per Region
- PHP MSSQL - sqlsrv stored procedure no error and no response
- SQL Update error. FK Conflict
- C# & SQL Server : execute stored procedure
- How to delete one column of table's from .edmx file fully c#
- Sage 50 v25 ODBC Error - The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER: 25.0
- Powershell - The term 'New-SqlColumnEncryptionKey' is not recognized - trying to create Column Encryption Key
- sql server: inserting into a table within a transaction for logging error occurance?
- I need to remove leading zeros after a decimal point
- SQL Server Logical File Name usages?
- SQL Server is trying to use two paths for backup location
- SQL Server 2005 Change Auditing
- SQL query to get all records with sum less than 10000
- Any classes to connect external database in WindowsPhone8?
- MySQL's LIMIT in SQL Server
- Why is there an error when trying to SELECT from a SQL table
- How do I narrow down the distinct rows based on column filters?
- comma separated string using CTE
- Argument data type varchar(max) is invalid for argument 1 of Decompress function
- How do I query XML stored as text?
- SQL Server table index columns order
- How to calculate decimal(x, y) max value in SQL Server
- (Laravel) Join 3 or more tables using "Eloquent Relationships"
- Return max(date) based on total of another column
- SMO syntax in C#
- SSIS ODBC error running multiple DFTs connecting to Sybase server
- How can I update an interval of dates in the database (Hibernate HQL)
- Joining tables in Powerpivot
- Entity Framework Performance Problem
Source:
stackoverflow.com