text positioning for select list
You should use len() instead of datalength() to get the number of characters in Value. They are different because Value is a double byte string (nvarchar).



CREATE TABLE #tmp (Value NVARCHAR(255))
INSERT INTO #tmp (Value) VALUES ('L1 [ABC]'),('    L2 [DEFGH]'),('        L3 [E]')

SELECT 
Value + SPACE(50 - DATALENGTH(Value)) + 'Description text'
FROM #tmp

SELECT 
Value + SPACE(50 - LEN(Value)) + 'Description text'
FROM #tmp


Result:



----------------------------------------------------------------------------
L1 [ABC]                                  Description text
    L2 [DEFGH]                      Description text
        L3 [E]                      Description text

(3 row(s) affected)


----------------------------------------------------------------------------
L1 [ABC]                                          Description text
    L2 [DEFGH]                                    Description text
        L3 [E]                                    Description text