(William Pearson) In this lesson, we will focus our attention on a function that has some characteristics in common with the Union() function, yet produces a very different result. The rather simple purpose of the Intersect() function is to compare two sets, then to return a set that consists of mem
Tag: sql server
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
Global Variables and SQL statements in DTS
(Darren Green) For those fortunate enough to have SQL 2000, using global variables with an Execute SQL Task, or as part of the source statement in the DataPump task is now a standard feature. For those still using SQL Server 7.0 this tedious process, but here are some examples of how it can be done.
Creating a Number (Sequentially incrementing values) table in T-SQL
There are many methods to create a Number/Sequencing table. With these methods, you will end up with a table of sequentially incrementing integer values that can be used for many SQL shortcuts & tricks.
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
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
SQL Server 2000 DTS Part 5 – DTS Designer Tasks and Global Variables
(Marcin Policht) In the previous article of this series, we covered types of DTS Designer tasks that are more straightforward. We will continue this discussion here, focusing on ones that are more complex. However, before we proceed, we will look into the concept of DTS Global Variables, which will
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
Next Generation SQL Server Part II – Yukon
(Vinod Kumar) Welcome to the Part II of the series where we take a closer look into Yukon . The release of the next version of SQL Server, code-named Yukon , is expected in early 2004(as per news reports). The Yukon release will include the .NET Common Language Runtime (CLR), which will allow develo
Global Variables and Stored Procedure Parameters
(Darren Green) One of the benefits of the SQL Server 2000 is that the SQL tasks support mapping of global variables to parameter placeholders within the SQL. This means you can use the global variable as an input parameter for your stored procedure.
