Reference columns in instructions by index number

When writing instructions, the columns the instruction references are defined via their name in the instruction. Alternatively, instructions allow column definition via the position of the column in the column index. This mechanism is for example required to write instructions for queries based on a stored procedure building dynamic datasets. For example a return data set can include one column for each application currently defined in the Alfabet database.

The first column in the data set is position 1 and can be referenced within the instruction as #1 . The next columns are numbered consecutively. For data sets created via a native SQL query, the first, invisible column defining the REFSTR of the current object is not included into the index.

Within the instruction, the index specification can either define one column or a range of columns by index when a single column specification is required. The instruction is then executed for each column in the range.

To define a range, the first and the last column of the range must be defined with a colon in between after the opening # sign:

Alternatively, a range starting with a defined column and ending with the end of the dataset can be defined with the reserved keyword end defining the end of the range: