Add array-support to SQL server engine
Arrays are a core part of programming, except in SQL-server, where they don't exist.
PostgreSQL has had array support for over 15 years (version 7.1 in 2001) by now...
And yet, in the year 2016, in the MS-universe, we still can't even parametrize an IN-clause in a SIMPLE & performant way, for example in a table-valued function or when passing a multiple-choice drop-down selection from SQL-Server reporting-services, or the combination of the two...
Instead, there are a multitude of horrible, error-prone, complicated, user-unfriendly, slow & unperformant ways of working around the problem. For example, when you need to prevent an infinite-recursion in a recursive query in a CYCLIC graph. Or the functionality to unnest an array...
This is no way of running things, and when even a completely free product like PostgreSQL can do it better, then the problem should be addressed, or SQL-server will sooner or later end up in the oblivion where it belongs if it doesn't keep up with the pace of others.
Upvotes: 6<=-=Mar 3 2017 2:00PM=-=>
We are aware that this is important missing feature; however, we have no plans to add this in the near future. We will keep this request in backlog to see how many votes will get.<=-=Jul 1 2017 7:03PM=-=>
Can’t even remember how many times I’ve wished to have this in SQL server.
If you want to get a somewhat realistic feel of how talked about this feature really is, you can check out the number of votes and more importantly views that this StackOverflow question has:
Unfortunately, not many people visit this website and participate in voting here so it’s not a reliable indicator of how much any particular feature is requested. Please consider moving to UserVoice. Visual Studio UserVoice for example has loads more activity.<=-=Jul 1 2017 11:17PM=-=>
We totally understand that t-sql as a language itself is desigened to work with sequences rather than variables and whole sql language corresponds to that. But simetimes there are scenarios where array support may really simpify developers life.