concatenate two columns with equal space
edit
SELECT (dbo.County.CountyName + ' (' + dbo.State.StateName + ' ) ')
AS CountyName from Table1
i am adding two columns for an example:
CountyName + '(' + StateName + ')'
how can i make sure or have fixed width of CountyName so that it looks neat/clean
for an example:
Torrance (California)
Torrance (Chicago)
Cook (Chicag开发者_运维技巧o)
....
select CountyName + space(20-len(CountyName)) + '(' + StateName + ')'...
精彩评论