How To Set SQL Query Rules To Fire Events For Individual Rows

A typical SQL Query Rule looks like this:

A SQL Query can return between zero and n rows – 0 rows, a single row, or multiple rows

Customers have the option to treat the whole query result as a single entity, or to treat each row independently, that is, to treat each returned row as its own result

This has implications in two areas: number of events fired, and how corrective action is processed

The following table illustrates this:

Number of Events That Are Fired

A single

event is fired and all the rows breaking the Rule are included in the same event

One event is fired for

each row breaking the Rule

Automatic Correction

The condition is regarded as corrected only if no

row breaks the Rule

Condition is considered corrected if the single row

that previously broke the Rule has been corrected and this row now no longer breaks

the Rule

Note:

The field ‘Comparison Column‘ should be specified to uniquely identify the row, so that the Argent Automatic Correction can correctly identify the row

The SQL Query Rule option ‘Include The Complete Query Result‘ is used to control how many rows should be checked

You should uncheck this option if the whole query result is treated as one entity, or huge number of rows are returned

When this option is unchecked, Argent stops reading rows when the first row matching the criteria is encountered; check this option and all matching rows are returned

The Rule option ‘Comparison Column (Used When Firing Events Separately)‘ should be set to the column number (starting from 1) if firing one event for each matching row