SQL Server Wish List

As I jump back into some SQL Server development, I've come across a couple things that I wish were features in SQL Server.

One is that when developing many stored procedures or functions, it has always been a pet peeve of mine that SQL Server basically lists every one together.  This is a bit cumbersome as if you are developing functions for a specific purpose, you are unable to group them together (except by schema, which is not what I'm looking for) so that it is easier to find them later.  A simple sub categorization based upon creating sub folders in the function folders would be an ideal and simple solution.

The other thought I'd like to express is the inability to create global variables.  There are times when one would like to be able to set global constants to be utilized in multiple procs/functions so that if they ever need to change you only have to change one spot rather then every sproc/function.  I'm uncertain as to why this design component was left out however I can at least make do with the workaround of creating a parameterless function to act as the constant by naming it and having it return the desired value, that way I only need to change the function to impact all sprocs/functions that call it.

Less then ideal, but it'll do.  Hopefully with the next upgrade, Microsoft will consider the usefulness of these suggestions.

This article is part of the GWB Archives. Original Author: Denis Pitcher

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.