IFLINKED
Evaluates the existence of a link between two tables and executes an INCLUDE statement, depending on the result. This instruction allows you to dynamically execute scripts, depending on a condition. The syntax is:
Syntax
IFLINKED [From link][To link][Include if true][Include if false]
Parameters
From link
Defines the name of the column from which the join is initiated. The column must be defined using the full name in the following format:
[Database].[Table].[Column]
To link
Defines the name of the column to which the link is created. The column must be defined using the full name in the following format:
[Database].[Table].[Column]
Include if true
The file name of a script file. If the link exists, the instruction includes this script file in the load process.
Include if false
The file name of a script file. If the link does not exist, the instruction includes this script file in the load process.
How to use IFLINKED
1 In Main file, choose New. In the list of transformation instructions, choose IFLINKED. If linked appears.
2 In From, define a database, a table, and a column from which the link initiates, as shown in Figure 5‑53.
3 In To, define a database, a table, and a column, to which the link points.
4 In Include if true, select the script file to be executed if the link exists. Choose Refresh if you do not see your script in the list.
5 In Include if false, select the script file to be executed if the link does not exist. Choose Refresh if you do not see your script in the list.
Figure 5‑53 Creating an Iflinked instruction
6 In If linked, choose OK. The Iflinked instruction appears in Main file.