Friday, February 24, 2012

Alpha Order in Management Studio

I know this isn't the right section, but they offered me no alternative.

I'm in Management Studio and am perusing the columns of a table, but they aren't in alphabetical order. How do I sort them by alphabetical order? There doesn't seem to be an obvious way to do this.

Thanks.

Moving to Transact-SQL forum for starters. This isn't an SSIS issue.

I do know that the columns appear in order of creation. Perhaps writing a query (and hence the move to Transact-SQL forum) would suit your needs.|||Click on the little SQL button in the toolbar, and add a ORDER BY clause to the statement.|||

Agreed Phil. Just use a query as:

select *

from sys.columns

where object_id = object_id('tableName')

order by name

The query could be expanded to include datatypes and such if you want, but if you are just trying to get the columns in the UI sorted, it doesn't work this way. I would suggest you file a suggestion here:

https://connect.microsoft.com/SQLServer/feedback/

No comments:

Post a Comment