From the course: SQL Server Integration Services
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Change a variable’s value - SQL Server Tutorial
From the course: SQL Server Integration Services
Change a variable’s value
- [Instructor] In the last couple of movies, I created a variable called VarColor, and then I hooked it into a OLE DB Source using a SQL command right here with a parameter. We're parameterizing it with a question mark here in the where clause of the select segment and then clicking over to parameters, you can see that parameter's being used here with the variable VarColor. Now, I want to take a look at how you can modify that variable value at runtime. This process is largely going to be dependent on your environment, the scripting languages that you're using, and how you're triggering your packages to run. But one way that we can modify the value of a variable is using a User Interface Control called an Input Box, that'll display when the package runs. To do that, I'm going to switch over to the Control Flow tab of the diagram. Then, I'll come up here to the top and I'll add in a Script Task. You can find it inside of the Common group. When I double-click on it to configure it, I…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.