T-SQL: Subquery – SELECT

Please see my other Database Development articles. Performing multiple, concurrent queries Often when needing a resultset, there’s a need to perform multiple queries to derive the desired data. In this example, we have multiple records of people, from which we need an aggregated report. In order to accomplish this goal, I must perform two separate…

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: Text file sources

Reading data from text files. 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 the…

SSIS: Table to Text file

Creating an SSIS Package to consume a table and write the recordset into a text file. Rename package to match project Next, Create data source allowing access to sql table. create connection manager. Next, select the source database. Create a data flow task and give it a name indicating its purpose. Double-click the task to edit…

SSIS: Sort Transformation

Controlling the sort order of data within the pipeline. 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…

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: Package Import/Export Wizard

Executing the Import/Export Wizard 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 configuring the…

SSIS: Nested tasks

Combining tasks to perform complex, iterative actions. In this example, I’ll illustrate how combine tasks by nesting one inside the other. 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…