IFEXISTS
Conditionally executes an INCLUDE statement, depending on the value of an expression. The expression evaluates the existence of a database object, such as a database, a table, and a column. Depending on the result, it executes the true or false INCLUDE statement.
Syntax
IFEXISTS [Object][Include if true][Include if false]
Parameters
Object
A database object such as database, table, or column.
Include if true
The file name of a script file. If the database object exists, the instruction includes this script file in the load process.
Include if false
The file name of a script file. If the database object does not exist, the instruction includes this script file in the load process.
The example shown in Figure 5‑51 checks if the [Decode] database exists. The IFEXISTS instruction executes the Analysis_Results.xml script if the table exists, or DecodesThroughTables.xml, if the table does not exist.
Figure 5‑51 Creating the IFEXISTS instruction