Was this helpful?
Retrieval into Complex Structures
Use the retrieve to a form or table field and retrieve loop variants of the retrieve statement with the assignment statement to perform selection into complex structures. The data types of the corresponding fields and columns must be compatible. Simple and complex assignment statements differ in the following ways:
A simple assignment statement assigns a single value at a time.
A complex assignment statement can assign one or more rows of values resulting from the retrieve operation to several simple fields or table-field columns.
4GL provides five kinds of complex assignment statements—singleton queries, table-field queries, simple attached queries, Master/Detail attached queries, and retrieve loops. When any one of these queries is executed, the query runs to completion, and the matching rows are stored in a temporary data set. The retrieve statement then accesses the data from the data set.
The first four of these assignment types are used with the statement variant, retrieve to a form or table field. They are discussed in more detail in Using Retrieve to a Form or Table Field. The fifth assignment type is discussed in Using Retrieve Loop.
Last modified date: 04/03/2024