Exists - script function

Exists() determines whether a specific field value has already been loaded into the field in the data load script. The function returns TRUE or FALSE, so can be used in the where clause of a LOAD statement or an IF statement.

Note: You can also use Not Exists() to determine if a field value has not been loaded, but caution is recommended if you use Not Exists() in a where clause. The Exists() function tests both previously loaded tables and previously loaded values in the current table. So, only the first occurrence will be loaded. When the second occurrence is encountered, the value is already loaded. See the examples for more information.

Syntax:  

Exists(field_name [, expr])

Return data type: Boolean

Arguments:  

Argument Description
field_name

The name of the field where you want to search for a value. You can use an explicit field name without quotes.

The field must already be loaded by the script. That means, you cannot refer to a field that is loaded in a clause further down in the script.

expr

The value that you want to check if it exists. You can use an explicit value or an expression that refers to one or several fields in the current load statement.

Note: You cannot refer to fields that are not included in the current load statement.

This argument is optional. If you omit it, the function will check if the value of field_name in the current record already exists.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?