Tag: sql server

Community

Dynamic Search Conditions in T-SQL

(Erland Sommarskog) A very common requirement in an information system is to have a function (or several functions) where the users may search the data by selecting freely among many possible search criterias. This is a tough challenge, because not only must you produce the desired output, but you m

Community

Set-Operation Alternatives

(Itzik Ben-Gan) ANSI SQL defines three operations—UNION, INTERSECT, and EXCEPT—that you can apply to two sets. These operations let you combine rows from different sets, locate which rows exist in both input sets, or find which rows exist in one set but not the other. Each of these operations has ma

Community

IT Business Case Template

As backend enterprise applications carry an increasingly larger burden for mission-critical reporting, rapid data processing, and performing complex calculations, databases must be responsive and scalable. Microsoft SQL Server 2000 Enterprise Edition and the Enterprise Edition (64-bit) fulfill compa

Community

Arrays and Lists in SQL Server

(Erland Sommarskog) In the public forums for SQL Server, you often see people asking How do I use arrays in SQL Server? Or Why does SELECT * FROM tbl WHERE col IN (@list) not work? This text describes several methods to do this, both good and bad ones. I also present data from performance tests of t