T-SQL: WITH

Please see my other Database Development articles. Performing Recursive Queries Prior to SQL Server 2005, performing recursive actions on data required the use of temporary tables, cursive, or some other memory-intensive method. Now, performing such operations requires much less code and avoids the previous performance increase. For this example, we’ll begin with a generic table…

T-SQL: Trigger – INSERT AFTER

Please see my other Database Development articles. Initiating actions in response to events One of the new features provided with SQL Server 2005 enables actions to be performed after an event occurs on an object, in this case the “people” table. To illustrate an “after” response, the following code creates a trigger that responds to…

SSIS: Using Views

Using Views to generate source data within a package. Following the same steps to create a package in the Table to text file article, I begin with an SSIS Project and a starting package. Instead of using the default package, I’ll delete it and select to create a new package using the Import/Export Wizard. After…

SSIS: Union All Transformation

Combining records from different data sources. I’ll begin with two separate text files, each representing sales from two states: California and Oregon. First, I’ll add a DataFlow task and add to it two Flat File sources each configured to pull in data from the text files. When configuring the sources, it’s imperative to ensure the…

SSIS: Precedence Constraints

Controlling the execution sequence of tasks. I’ll begin by dragging these tasks unto the designer: Execute SQL, Data Flow, and Send Mail. Then, connect the Execute SQL task’s green arrow to the Data Flow task. Right-click the new constraint and verify these values. Drag new constraints between the Execute SQL task, Send Mail task, and…

SSIS: Package Level variables

Sharing custom variables between tasks in a package. In this example, I’ll illustrate the use of a package-level variable being shared between ForEach Loop Container and Script Task Control Flow tasks. This package will iterate through text files and display the name of each to the user. As I explained in my Overview of Variables…

SSIS: Multicast Transformation

Implementing conditional logic to redirect output. I’ll begin with two separate text files, each representing sales from two states: California and Oregon. First, I’ll add a DataFlow task and add add to it two Flat File sources each configured to pull in data from the text files. When configuring the sources, it’s imperative to ensure…

SSIS: ForEach Loop Container

Performing complex, iterative actions. In this example, I’ll illustrate how integrate iterative actions into a package. This package will iterate through text files and display the name of each to the user. As I explained in my Overview of Variables article, I’ll begin by adding an new Package Level variable and naming it Filename. Next,…

SSIS: File Monitoring

Using a For Loop and Script Task objects to monitor the file system. In this example, I’ll illustrate how to use a For Loop container to wrap a Scrip Task object which iteratively monitors the file system for the presence of a file and once found, uses another Script Task object to notify the user.…

SSIS: File Iteration

Using custom C# code to iterative through files. In this example, I’ll illustrate how to integrate custom iterative actions into a package. This package will iterate through text files and display the name of each to the user. As I explained in my Overview of Variables article, I’ll begin by adding an new Package Level…