Sorting queries in Solution Explorer

  • Hi Everyone,

    In SSMS 2005 one of the showstoppers that prevented me from using SQL Projects was the inability to sort queries in Solution Explorer or create subfolders, which has been in Visual Studio for years. I hoped they would've added this to SQL 2008 when it was released, but alas it appears they didn't.

    Does anyone know if I'm missing something or if there's some way short of manually editing the solution file to sort the Queries? For the smaller solutions it's not a big deal but for larger ones with 100+ queries, it's very counter productive to have them in the order of creation as opposed to in alpha order.

    Thanks for any suggestions --

    Sam Alex

  • Jasper Smith has written a tool to sort solution files in SSMS. I haven't tested it with SQL 2008, but I would assume it will work as well since the solution file is just xml.

    http://www.sqldbatips.com/showarticle.asp?ID=78

    [font="Verdana"]Markus Bohse[/font]

  • I finally decided there was little advantage, and too many disadvantages, to using the SSMS solutions. All my SQL is now kept and opened directly from the file system. Perhaps just because I don't know any better, but, for me, it is a much superior solution.

    Advantages:

    1. SQL code stored in a directory structure organized to my needs.

    2. Save As works (as it should) to make a copy with a different name or in a different directory; not (never understood this, I claim it is a bug) as it does under solutions to simply rename the source and discard the original copy.

    Note: One must be aware of the bug (which I recall happens even working with solutions) where the page header of the source file does not correctly reflect the last name used in a Save As. The redeeming behavior is that the tool tip associated with the save icon (diskette) does display the correct name.

    3. Comments can be added to the source files (if selected in the file detail view.)

    4. Files can be displayed in any order supported by the file explorer.

    Disadvantages:

    I have yet to find any, again perhaps only because I don't know any better.

  • For those of you still using SSMS 2005 there's a new plugin available that is basically a solution explorer replacement... Here's the link to Management Studio 2005 Project Plugin

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply