Hello There,
Could you please guide me here to solve this issue,
in my column (named as State) contains values as below
California
Washington
Utah
Connecticut
Massachusets
in the output how can i add a spaces to make up every column values as 15 length (for ex, Utah is 4 length then need to add 11 spaces, California is 10 would like to add 5 spaces)
i tried below but no use in Sql 2008 R2
SELECT distinct state
,
state
+SPACE(35-len(state)),
len(state+SPACE(35-len(state)))
FROM dbo.ordersInfo
Thank you in advance
Milan