Variables Window

Use the Variables window to create and modify user-defined variables and view system variables.

You can optionally display the Variables window by mapping the View.Variables command to a key combination of your choosing on the Keyboard page of the Options dialog box.

Options

  • Add Variable
    Add a user-defined variable.
  • Delete Variable
    Select a variable from the list, and then click Delete Variable.
  • Show System Variables
    Click to toggle between a list that includes system variables and a list that does not. System variables are predefined. You cannot add or delete system variables or modify their properties.

    This list is color coded. System variables are gray, and user-defined variables are blue. The list includes variable properties.

  • Show All Variables
    Click to toggle between a list that includes all the variables in a package and a list that filters the variables.

    If the Show All Variables option is not selected, the list includes only the variables in the scope of the package or the selected container or task; otherwise, the list includes all variables. If the Show System Variables option is selected, the list includes system variables. System variables are predefined. You cannot add or delete system variables or modify their properties.

    This list is color coded. User-defined variables are blue and system variables are gray. The list includes variable properties.

  • Choose Variable Columns
    Click to open the Choose Variable Columns dialog box where you can change the column selection. For more information, see Choose Variable Columns.
  • Name
    View the variable name. For user-defined variables, you can update the variable name.
  • Scope
    View the scope of the variable. A variable has either the scope of the entire package, or the scope of a container or task. The scope of the variable must be sufficient so that the variable is visible to any other tasks or components that need to read or set its value. Scope cannot be modified in the Variables window, but depends on the item that was selected in the designer when you created the variable.
  • Data Type
    View the data type of the variable. For user-defined variables, you can select a data type from the list.
  • Value
    View the variable value. For user-defined variables, you can update the variable value. This value can be a literal or an expression.
  • Namespace
    View the namespace name. User-defined variables are initially created in the User namespace, but you can change the namespace name. To display this column and change the namespace, click Choose Variable Columns and select the option in the Choose Variable Columns dialog box.
  • Raise Change Event
    Indicate whether to raise an event when a value changes. By default, the Variables window does not list this column. Click Choose Variable Columns and select the option in the Choose Variable Columns dialog box.

See Also

Reference

Other UI Reference

Other Resources

Integration Services Variables
Using Variables in Packages
Integration Services Expression Reference

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

17 July 2006

Changed content:
  • Added explanation of variable scope.

14 April 2006

Changed content:
  • Updated descriptions for the Show System Variables and Show All Variables options.