WHAT'S HOT
Prev | Current Page 181 | Next

Jayaram Krishnaswamy

"Beginners Guide to SQL Server Integration Services Using Visual Studio 2005"


Calculation using variables
In the previous example, the summands were assigned in the code, but in
this example they are defined variables in the scope of the script.
??? ???
Package with a Script Task
[ 274 ]
Add an imports statement to build a string
In this example, the System.Text class is added to build up strings using
the script.
Retrieve data from a database table in the SQL Server 2005
In this example, you will connect to the SQL Server 2005 and retrieve data
from a table on one of its databases.
Combine the last two examples in displaying data and copying to a file
In this example, the data retrieved is displayed using a string builder and also
written to a new text file created on-the-fly.
Hands-On Exercise: Creating a Package
with Script Tasks
In this chapter, we will just create one project and test the various examples using
individual Script Tasks in the 'Canvas'. It is not necessary to disable the task to
execute the other task(s), as it is possible to just execute the task you need to execute.
1. Create a Business Intelligence Project, Ch 19, and rename the default name of
the package.
The default name was changed to scripts.dtsx in this exercise.
2. Drag and drop a Script Task from the Control Flow Items group from the
Toolbox onto the Control Flow page of the Canvas.
3. Right-click the Script Task and from the drop-down choose Edit??¦
(or double-click the Script Task component).
Simple Calculation
This opens up the Script Task Editor, as shown in the next screenshot.


Pages:
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193