dbTalk Databases Forums  

Re: SSMS explorer. Sorting the columns names in a table.

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss Re: SSMS explorer. Sorting the columns names in a table. in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-06-2009 , 08:27 AM






No, there is no such functionality.


On 2/24/09 8:31 AM, in article efXZG#FiJHA.760 (AT) TK2MSFTNGP03 (DOT) phx.gbl,
"Oriane" <oriane (AT) noemail (DOT) noemail> wrote:

Quote:
Hi there,

I would like to know if we can sort the columns name of a table by default
in the SSMS 2005/2008 explorer.
I would like to display first the primary, unique and foreign keys columns,
then the rest of them, alphabetically sorted.

Best regards



Reply With Quote
  #2  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-06-2009 , 08:43 AM






(Also can you please fix your system clock; it is not 2/24 in any part of
the world I'm aware of...)


On 2/24/09 8:31 AM, in article efXZG#FiJHA.760 (AT) TK2MSFTNGP03 (DOT) phx.gbl,
"Oriane" <oriane (AT) noemail (DOT) noemail> wrote:

Quote:
Hi there,

I would like to know if we can sort the columns name of a table by default
in the SSMS 2005/2008 explorer.
I would like to display first the primary, unique and foreign keys columns,
then the rest of them, alphabetically sorted.

Best regards



Reply With Quote
  #3  
Old   
Oriane
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-06-2009 , 09:41 AM



Hi Aaron,
"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> a écrit dans le
message de news:C5B1B2E8.EABC%ten.xoc (AT) dnartreb (DOT) noraa...
Quote:
No, there is no such functionality.
So, is there a simple way to "manually" sort the columns of a table via SQL
(when the column is alreday filled with data) ?

Thank you (I have reset the system clock :-)).



Reply With Quote
  #4  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-06-2009 , 10:05 AM



You just can sort columns alphabetically (ascending or descenting) using
SSMS' s Object Explorer Details.

--
Ekrem Önsoy



"Oriane" <oriane (AT) noemail (DOT) noemail> wrote

Quote:
Hi there,

I would like to know if we can sort the columns name of a table by default
in the SSMS 2005/2008 explorer.
I would like to display first the primary, unique and foreign keys
columns, then the rest of them, alphabetically sorted.

Best regards


Reply With Quote
  #5  
Old   
Oriane
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-06-2009 , 11:13 AM



Hi Ekrem,
"Ekrem Önsoy" <ekrem (AT) compecta (DOT) com> a écrit dans le message de
news:910A0F22-C24B-4818-90DF-A7817B783105 (AT) microsoft (DOT) com...
Quote:
You just can sort columns alphabetically (ascending or descenting) using
SSMS' s Object Explorer Details.
Can you be more precise ?

Best regards



Reply With Quote
  #6  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-06-2009 , 04:50 PM



Oriane (oriane (AT) noemail (DOT) noemail) writes:
Quote:
So, is there a simple way to "manually" sort the columns of a table via
SQL (when the column is alreday filled with data) ?
If you want to change the table definition to reflect the desired order,
you will have to go the long road, and create a new table, migrate
data over, move referencing foreign keys etc. Certainly an advanced
operation, which requires good understanding of what you are doing.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #7  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-07-2009 , 04:25 AM



Open up SSMS and connect to your SQL Server instance.

Then expand Databases node and at the right side, you'll see Object Explorer
Details tab by default. If it's not open, then you can use View -> Object
Explorer Details menu to open it. In this tab, you'll find column headers
such as "Name" and when you click on this column header once, you'll see
that it'll sort the items by their names and if you click again, it'll sort
them descending.

--
Ekrem Önsoy



"Oriane" <oriane (AT) noemail (DOT) noemail> wrote

Quote:
Hi Ekrem,
"Ekrem Önsoy" <ekrem (AT) compecta (DOT) com> a écrit dans le message de
news:910A0F22-C24B-4818-90DF-A7817B783105 (AT) microsoft (DOT) com...
You just can sort columns alphabetically (ascending or descenting) using
SSMS' s Object Explorer Details.
Can you be more precise ?

Best regards


Reply With Quote
  #8  
Old   
Oriane
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-09-2009 , 01:56 AM



Hi Ekrem,

You made me discover something !

Thanks


Reply With Quote
  #9  
Old   
Mark Han[MSFT]
 
Posts: n/a

Default RE: SSMS explorer. Sorting the columns names in a table. - 02-09-2009 , 02:46 AM



Hi Oriane,
Thank you for using Microsoft MSDN Managed Newsgroup. My name is Mark Han.
I am glad to work with you on this issue.

From your description, I understand that you would like to sort the column
as the following. display first the primary, unique and foreign keys
columns and then display the rest as alphabetically sorted. If I have
misunderstood, please let me know.

Based on my research, it seems that there is no such function to meet your
requirement. However we can display the columns alphabetically in SQL 2008

Besides, I have apply your requirement to our dev team, if anything
updated, i will public it.

If there is anything unclear, please do not hesitate to let me know.

Have a nice day.

Best regards,
Mark Han
Microsoft Online Community Support
================================================== =========
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg (AT) microsoft (DOT) com.
================================================== =========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or
a Microsoft Support Engineer within 2 business day is acceptable. Please
note that each follow up response may take approximately
2 business days as the support professional working with you may need
further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are
best handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx

================================================== ==========
This posting is provided "AS IS" with no warranties, and conf


Reply With Quote
  #10  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: SSMS explorer. Sorting the columns names in a table. - 02-09-2009 , 03:35 AM



Enjoy it mate =)

--
Ekrem Önsoy



"Oriane" <oriane (AT) noemail (DOT) noemail> wrote

Quote:
Hi Ekrem,

You made me discover something !

Thanks


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.