My Blog List

hotinit.com. Powered by Blogger.

Search This Blog

Showing posts with label trailing space. Show all posts
Showing posts with label trailing space. Show all posts

Adding Trailing Spaces to a Column

Thursday, 23 June 2011


Declare @MaxLengthInColumn
SELECT @MaxLengthInColumn=MAX(len(ColumName) ) from TableName

SELECT ColumnName+space(   @MaxLengthInColumn -  len(ColumName)   ) FROM TableName
 

Blogger news

Blogroll

Most Reading

8.6/10