Fetch Query Result

 

Retrieves data from memory, one row at a time, then passes it to the next action cell (such as Format String) for processing.

 

Use this after a Database Query, Execute Query or DATA MANAGEMENT action cell has been used to perform a 'Select' query for retrieving data from a database table. The action cell performing the query populates a file in memory with the results and optionally returns a value indicating the number of rows found. The query populates the variables defined to hold returned values with values taken from the first row found.

Properties

Option

Description

Query Statement

Select the query whose results you want to fetch.

Result Row

Optionally, enter an integer variable to hold the row number of each returned result. Row numbering begins at 1.

Record Selector

Select one of the following:

First

Fetches the first row.

Last

Fetches the last row.

Explicit

Enables the Record Number field for specifying the row to fetch (see below)

Previous

Fetches the last row, the preceding row, and so on down to the first row, after which the ‘End of file’ exit route is taken

Next

Fetches the first row, the next row, and so on up to the last row, after which the ‘End of file’ exit route is taken.

Record Number

This is displayed if the Record Selector property is set to 'Explicit'. 

Select the row to fetch.

Exit Points

Exit Point

Description

Complete

This is taken when the required row has been fetched successfully.

End of File

This is taken when every row has been fetched successfully.

Error

This is taken if the query's results could not be fetched.