I have a task of selecting some columns and show each set of columns in a single line, but with a required format. The first set of data will use 127 spaces, which include 'AAAA', [LV_WRR], 'D', [LV_WRR] and [ID], but [ID] varies in length, and that is the problem. [FTA] should start in the space 128, disregarding the length used by [ID].
This is what I have up to now:
SELECT
'AAAA'
+ [LV_WRR]
+ 'D'
+ [LV_WRR]
+ [ID]
+ SPACE(120 - LEN([ID]))
+ [FTA]
+ [FT_ID]
FROM MyTable
[ID] column has the data with different lengths.
Any ideas?
Thanks.