The Excel Column Name assigment problem
- by Peter Larsson
Here is a generic algorithm to get the Excel column name according to it's position. By changing the @Base parameter, you can do this for any sequence according to same style as Excel.
DECLARE @Value INT = 8839,
@Base TINYINT = 26
;WITH cteSequence(Value, Delta, Quote, Base, Chr)
AS (…