In the Command on Source tab, specify the SELECT statement.

Working with Procedures, Variables, Sequences, and User Functions 12-11 A variable can be created as a global variable or in a project. This defines the variable scope. Global variables can be used in all projects, while project variables can only be used within the project in which they are defined. The variable scope is detailed in Section 12.2.3, Using Variables . The following section describes how to create and use variables.

12.2.2 Creating Variables

To create a variable:

1. In Designer Navigator select the Variables node in a project or the Global

Variables node in the Others view. 2. Right-click and select New Variable. The Variable Editor opens. 3. Specify the following variable parameters: 4. If you want the variables value to be set by a query:

1. Select the Refreshing tab.

2. Select the logical Schema where the command will be executed, then edit the

command text in the language of the schemas technology. You can use the Expression Editor for editing the command text. It is recommended to use Properties Description Name Name of the variable, in the form it will be used. This name should not contain characters that could be interpreted as word separators blanks, etc. by the technologies the variable will be used on. Variable names are not case-sensitive. That is, YEAR and year are considered to be the same variables. The variable name is limited to a length of 400 characters. Datatype Type of variable: ■ Alphanumeric 255 characters ■ Date This format is a Java date format that matches your machines local parameters. Note that you may need to adapt the format depending to the RDBMS ■ Numeric Maximum 10 digits ■ Text Unlimited length Action This parameter shows the length of time the value of a variable is kept for: ■ Non-persistent : The value of the variable is kept in memory for a whole session. ■ Last value : Oracle Data Integrator stores in its repository the latest value held by the variable. ■ Historize : Oracle Data Integrator keeps a history of all the values held by this variable. Use this option if you want to keep a history of the variable values or for debugging purposes. Note that Historize should be used selectively as the variable history is not automatically purged and grows each time the variable is used. Using history for many variables has an impact on the size of the work repository. Default Value The value assigned to the variable by default. Description Detailed description of the variable